Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class PasswordFormatRule implements Rule |
||
9 | { |
||
10 | /** |
||
11 | * This Password Validation rule should be referenced wherever we need the user input their password on the site. |
||
12 | * The rules used on their passwords are; |
||
13 | * 1) Password is required. |
||
14 | * 2) Must be at least 8 characters |
||
15 | * 3) The password must contain at least one character from the following categories: |
||
16 | * lower-case characters (a-z), upper-case characters (A-Z), |
||
17 | * digits (0-9), and non-alphanumeric symbols (%, $, !, etc.). |
||
18 | * Guide used by Polivas Korop |
||
19 | * https://laraveldaily.com/how-to-create-custom-validation-rules-laravel/ |
||
20 | */ |
||
21 | |||
22 | 10 | public function passes($attribute, $value) { |
|
25 | } |
||
26 | |||
27 | 2 | public function message() { |
|
32 |