Final Class Yiisoft\Hydrator\Validator\Attribute\Validate
| Inheritance | Yiisoft\Hydrator\Validator\Attribute\Validate |
|---|---|
| Implements | Yiisoft\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.
Public Methods
Method Details
| public mixed __construct ( \Yiisoft\Validator\RuleInterface $rules ) | ||
| $rules | \Yiisoft\Validator\RuleInterface |
Validation rules. |
public function __construct(RuleInterface ...$rules)
{
$this->rules = array_values($rules);
}
| public string getResolver ( ) |
public function getResolver(): string
{
return ValidateResolver::class;
}
| public \Yiisoft\Validator\RuleInterface[] getRules ( ) | ||
| return | \Yiisoft\Validator\RuleInterface[] |
Validation rules. |
|---|---|---|
public function getRules(): array
{
return $this->rules;
}
Signup or Login in order to comment.