Browse Source

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

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
6d25d3aef6
  1. 4
      framework/yii/base/Model.php

4
framework/yii/base/Model.php

@ -116,6 +116,10 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* 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]].
* They each has an alias name which can be used when specifying a validation rule.
*

Loading…
Cancel
Save