| Total Complexity | 2 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 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) The password is required. |
||
| 14 | * 2) The password must be at least 9 characters. |
||
| 15 | * 3) The password may not be greater than 100 characters. |
||
| 16 | * 4) The password must contain at least one character from the following categories: |
||
| 17 | * lower-case characters (a-z), upper-case characters (A-Z), |
||
| 18 | * digits (0-9), and non-alphanumeric symbols (%, $, !, etc.). |
||
| 19 | * Guide used by Polivas Korop |
||
| 20 | * https://laraveldaily.com/how-to-create-custom-validation-rules-laravel/ |
||
| 21 | */ |
||
| 22 | 8 | ||
| 23 | 8 | public function passes($attribute, $value) |
|
| 27 | 1 | } |
|
| 28 | 1 | ||
| 29 | public function message() |
||
| 34 |