Commit 6d25d3ae by Alexander Makarov

Added info about custom validator method signature to Model::rules phpdoc

parent 8ca17bbf
...@@ -116,6 +116,10 @@ class Model extends Component implements IteratorAggregate, ArrayAccess ...@@ -116,6 +116,10 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* function validatorName($attribute, $params) * function validatorName($attribute, $params)
* ~~~ * ~~~
* *
* In the above `$attribute` refers to currently validated attribute name while `$params` contains an array of
* validator configuration options such as `max` in case of `length` validator. Currently validate attribute value
* can be accessed as `$this->[$attribute]`.
*
* Yii also provides a set of [[Validator::builtInValidators|built-in validators]]. * Yii also provides a set of [[Validator::builtInValidators|built-in validators]].
* They each has an alias name which can be used when specifying a validation rule. * They each has an alias name which can be used when specifying a validation rule.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment