This extension is a simple Validator. It can be used to validate a model attribute with any other built in or custom validator. It is only evaluated if another attribute fulfills certain preconditions (checked via any built in or custom validator).
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.1.2 or above (might work with early version, too)
Installation ¶
- Extract the release file under
protected/validators
- Add 'application.validators.*' to the 'import' array in the global config
Usage ¶
See the following code example: ~~~ [php model file]
public function rules() {
return array(
array('userEmail', 'CascadedValidator', 'parentRule' => array('receiveNewsletter', 'match', 'pattern' => '/yes, please/'), 'childRule' => array('email'), 'negateParentCheck' => false),
);
}
##Change Log
###June 25, 2010
* Initial release.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.