Model / Form validator.
Requirements ¶
Yii 1.1 or above ...
It's to use for a form/model validation rule.
Features ¶
- ready to use out of the box (see example basic below)
- customize parameters
- minimum number of characters
- minimum number of upper case characters
- minimum number of lower case characters
- minimum number of digits characters
- minimum number of special characters
- documentation included
- code quality (coded using unit test)
Examples ¶
Basic (default params) ¶
public function rules()
{
return array(
array('password','ext.SPasswordValidator.SPasswordValidator')
);
}
With custom parameters ¶
Number of upper case chars set to 1, minimum number of characters set to 10.
public function rules()
{
return array(
array('password','ext.SPasswordValidator.SPasswordValidator', 'up' => 1, 'min' => 10)
);
}
Installation ¶
uncompress the archive in protected/extensions/
. So path to php file will be protected/extensions/SPasswordValidator/SPasswordValidator.php
.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.