0 follower

Final Class Yiisoft\FormModel\Attribute\Safe

InheritanceYiisoft\FormModel\Attribute\Safe
ImplementsYiisoft\Validator\RuleHandlerInterface, Yiisoft\Validator\RuleInterface

Safe validation rule marks a model property as safe for filling with {@see FormHydrator::populate()}, {@see FormHydrator::populateAndValidate()}, {@see FormHydrator::populateFromPost()}, and {@see FormHydrator::populateFromPostAndValidate()}.

Method Details

Hide inherited methods

getHandler() public method

public \Yiisoft\Validator\RuleHandlerInterface getHandler ( )

                public function getHandler(): RuleHandlerInterface
{
    return $this;
}

            
getName() public method

public string getName ( )

                public function getName(): string
{
    return self::class;
}

            
validate() public method

public \Yiisoft\Validator\Result validate ( mixed $value, object $rule, \Yiisoft\Validator\ValidationContext $context )
$value mixed
$rule object
$context \Yiisoft\Validator\ValidationContext

                public function validate(mixed $value, object $rule, ValidationContext $context): Result
{
    return new Result();
}