#method of your model class, that you need to validate public function rules() { return array( # If you imported ext.validators.age.EAgeValidator or placed EAgeValidator.php # to directory, that is imported (for example, protected/components) array('your_birthdate_field_name1', 'EAgeValidator'), ... # With options and full path to extension array('your_birthdate_field_name2', 'ext.validators.age.EAgeValidator', 'minAge'=>16, 'maxAge'=>120, 'allowEmpty'=>false ), ... ); }
BSD
Total 2 comments
Hi,
How can I integrate with client validation?
Hello,
I am trying to add this to the Yii User module and I am having trouble making it work. I have tried adding it in the validators field on the profile field management and I have also tried adding it to the RegistrationForm model but neither way is working. Has anyone successfully added this to the Yii User module?
Leave a comment
Please login to leave your comment.