getValidators() public method
Returns all the validators declared in rules().
This method differs from getActiveValidators() in that the latter only returns the validators applicable to the current $scenario.
Because this method returns an ArrayObject object, you may manipulate it by inserting or removing validators (useful in model behaviors). For example,
$model->validators[] = $newValidator;
public ArrayObject|yii\validators\Validator[] getValidators ( ) | ||
---|---|---|
return | ArrayObject|yii\validators\Validator[] |
All the validators declared in the model. |
Please login to continue.