createValidator() public static method
Creates a validator object.
| public static yii\validators\Validator createValidator ( $type, $model, $attributes, $params = [] ) | ||
|---|---|---|
| $type | string|Closure |
The validator type. This can be either:
|
| $model | yii\base\Model |
The data model to be validated. |
| $attributes | array|string |
List of attributes to be validated. This can be either an array of the attribute names or a string of comma-separated attribute names. |
| $params | array |
Initial values to be applied to the validator properties. |
| return | yii\validators\Validator |
The validator |
Please login to continue.