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).
protected/validatorsSee the following code example:
public function rules() { return array( array('userEmail', 'CascadedValidator', 'parentRule' => array('receiveNewsletter', 'match', 'pattern' => '/yes, please/'), 'childRule' => array('email'), 'negateParentCheck' => false), ); }
Be the first person to leave a comment
Please login to leave your comment.