1 | <?php |
||
15 | class StrengthValidator extends Validator |
||
16 | { |
||
17 | /** |
||
18 | * @var integer The minimum length of the string. |
||
19 | */ |
||
20 | public $length = 8; |
||
21 | |||
22 | /** |
||
23 | * @var boolean Whether special chars are required in the string or not. |
||
24 | */ |
||
25 | public $specials = true; |
||
26 | |||
27 | /** |
||
28 | * @var boolean Whether numbers are required in the string or not. |
||
29 | */ |
||
30 | public $numbers = true; |
||
31 | |||
32 | /** |
||
33 | * @var boolean Whether letters are required in the string or not. |
||
34 | */ |
||
35 | public $letters = true; |
||
36 | |||
37 | /** |
||
38 | * @var boolean Whether at least one upper char must exist in the string or not. |
||
39 | */ |
||
40 | public $uppercase = true; |
||
41 | |||
42 | /** |
||
43 | * @var boolean Whether at least one lower case char must exist in the string or not. |
||
44 | */ |
||
45 | public $lowercase; |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | public function validateAttribute($model, $attribute) |
||
78 | } |