MetaFox

MetaFoxPasswordFormatRule
in package
implements Rule

Class MetaFoxPasswordFormatRule.

Table of Contents

Interfaces

Rule

Constants

LOWERCASE_CHARACTER_PATTERN  = '/[a-z]/'
Lower character pattern for a strong password.
NUMBER_PATTERN  = '/[0-9]/'
Number pattern for a strong password.
SPECIAL_CHARACTER_PATTERN  = '/[!"#$%&\'()*+,\\-.\\/:;<=>?@[\\]^_`{|}~]/'
Special character pattern for a strong password.
UPPERCASE_CHARACTER_PATTERN  = '/[A-Z]/'
Uppercase character pattern for a strong password.

Methods

getFormRules()  : array<string|int, mixed>
getRequestRules()  : array<string|int, mixed>
getStrongPasswordFormRule()  : array<string|int, mixed>
isStrongPassword()  : bool
message()  : string
Get the validation error message.
passes()  : bool
Determine if the validation rule passes.
getLowerCaseRule()  : string
getMaxLengthRule()  : string
getMinLengthRule()  : string
getNumberRule()  : string
getSpecialCharactersRule()  : string
getUpperCaseRule()  : string

Constants

LOWERCASE_CHARACTER_PATTERN

Lower character pattern for a strong password.

public mixed LOWERCASE_CHARACTER_PATTERN = '/[a-z]/'

SPECIAL_CHARACTER_PATTERN

Special character pattern for a strong password.

public mixed SPECIAL_CHARACTER_PATTERN = '/[!"#$%&\'()*+,\\-.\\/:;<=>?@[\\]^_`{|}~]/'

UPPERCASE_CHARACTER_PATTERN

Uppercase character pattern for a strong password.

public mixed UPPERCASE_CHARACTER_PATTERN = '/[A-Z]/'

Methods

getRequestRules()

public getRequestRules() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStrongPasswordFormRule()

public getStrongPasswordFormRule() : array<string|int, mixed>
Return values
array<string|int, mixed>

passes()

Determine if the validation rule passes.

public passes(string $attribute, mixed $value) : bool
Parameters
$attribute : string
$value : mixed
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
bool

        
On this page

Search results