rex_password_policy
in package
Tags
Table of Contents
Methods
- __construct() : mixed
- check() : true|string
- getDescription() : string|null
- getHtmlAttributes() : array<string, string>
- Generates the corresponding html attributes `minlength`, `maxlength` and `passwordrules`.
- getRule() : string
- isValid() : bool
- matchesCount() : bool
Methods
__construct()
public
__construct(array<string, array{min?: int, max?: int}> $options) : mixed
Parameters
- $options : array<string, array{min?: int, max?: int}>
check()
public
check(string $password[, int|null $id = null ]) : true|string
Parameters
- $password : string
- $id : int|null = null
Tags
Return values
true|string —true
on success, otherwise an error message
getDescription()
public
getDescription() : string|null
Return values
string|nullgetHtmlAttributes()
Generates the corresponding html attributes `minlength`, `maxlength` and `passwordrules`.
public
getHtmlAttributes() : array<string, string>
Tags
Return values
array<string, string>getRule()
protected
getRule() : string
Tags
Return values
stringisValid()
protected
isValid(string $password) : bool
Parameters
- $password : string
Return values
boolmatchesCount()
protected
matchesCount(int $count, array{min?: int, max?: int} $options) : bool
Parameters
- $count : int
- $options : array{min?: int, max?: int}