PasswordStrength
extends AbstractValidator
in package
Table of Contents
Constants
- MIN_VALID_SCORE = 2
Methods
- validate() : bool
- Value validation
- countScore() : int
- Calculates password strength score
Constants
MIN_VALID_SCORE
public
mixed
MIN_VALID_SCORE
= 2
Methods
validate()
Value validation
public
validate(Validation $validation, string $attribute) : bool
Parameters
- $validation : Validation
-
- validation object
- $attribute : string
-
- validated attribute
Return values
boolcountScore()
Calculates password strength score
private
countScore(string $value) : int
Parameters
- $value : string
-
- password
Return values
int —(1 = very weak, 2 = weak, 3 = medium, 4+ = strong)