forked from kartik-v/yii2-password
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresets.php
58 lines (55 loc) · 1.24 KB
/
presets.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* @package yii2-password
* @author Kartik Visweswaran <kartikv2@gmail.com>
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2016
* @version 1.5.3
*/
namespace kartik\password;
return [
StrengthValidator::SIMPLE => [
'min' => 6,
'upper' => 0,
'lower' => 1,
'digit' => 1,
'special' => 0,
'hasUser' => false,
'hasEmail' => false
],
StrengthValidator::NORMAL => [
'min' => 8,
'upper' => 1,
'lower' => 1,
'digit' => 1,
'special' => 0,
'hasUser' => true,
'hasEmail' => true
],
StrengthValidator::FAIR => [
'min' => 10,
'upper' => 1,
'lower' => 1,
'digit' => 1,
'special' => 1,
'hasUser' => true,
'hasEmail' => true
],
StrengthValidator::MEDIUM => [
'min' => 10,
'upper' => 1,
'lower' => 1,
'digit' => 2,
'special' => 1,
'hasUser' => true,
'hasEmail' => true
],
StrengthValidator::STRONG => [
'min' => 12,
'upper' => 2,
'lower' => 2,
'digit' => 2,
'special' => 2,
'hasUser' => true,
'hasEmail' => true
],
];