Documentation

rex_password_policy
in package

Tags
author

gharlan

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
throws
rex_exception
Return values
true|string

true on success, otherwise an error message

getDescription()

public getDescription() : string|null
Return values
string|null

getRule()

protected getRule() : string
Tags
deprecated

since 5.12, use getDescription instead

Return values
string

isValid()

protected isValid(string $password) : bool
Parameters
$password : string
Return values
bool

matchesCount()

protected matchesCount(int $count, array{min?: int, max?: int} $options) : bool
Parameters
$count : int
$options : array{min?: int, max?: int}
Return values
bool

        
On this page

Search results