Final Class Yiisoft\Hydrator\Validator\Attribute\Validate
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
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 ( \ | ||
| $rules | \ |
Validation rules. |
public function __construct(RuleInterface ...$rules)
{
$this->rules = array_values($rules);
}
| public string getResolver ( ) |
public function getResolver(): string
{
return ValidateResolver::class;
}
| public \ | ||
| return | \ |
Validation rules. |
|---|---|---|
public function getRules(): array
{
return $this->rules;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.