0 follower

Final Class Yiisoft\Hydrator\Validator\Attribute\Validate

InheritanceYiisoft\Hydrator\Validator\Attribute\Validate
ImplementsYiisoft\Hydrator\Attribute\Parameter\ParameterAttributeInterface

Added to either property or parameter to indicate that raw values should be validated. Validation rules are passed as arguments to the attribute.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( \Yiisoft\Validator\RuleInterface $rules )
$rules \Yiisoft\Validator\RuleInterface

Validation rules.

                public function __construct(RuleInterface ...$rules)
{
    $this->rules = array_values($rules);
}

            
getResolver() public method

public string getResolver ( )

                public function getResolver(): string
{
    return ValidateResolver::class;
}

            
getRules() public method

public \Yiisoft\Validator\RuleInterface[] getRules ( )
return \Yiisoft\Validator\RuleInterface[]

Validation rules.

                public function getRules(): array
{
    return $this->rules;
}