class Validation (View source)

Methods

bool
isUniqueUsername(string $uName)

Checks whether a passed username is unique or if a user of this name already exists.

bool
isUniqueEmail(string $uEmail)

Checks whether a passed email address is unique.

bool
password(string $pass) deprecated

Returns true if this is a valid password.

bool
username(string $username)

Returns true if this is a valid username.

Details

bool isUniqueUsername(string $uName)

Checks whether a passed username is unique or if a user of this name already exists.

Parameters

string $uName

Return Value

bool

bool isUniqueEmail(string $uEmail)

Checks whether a passed email address is unique.

Parameters

string $uEmail

Return Value

bool

bool password(string $pass) deprecated

deprecated Use `\Core::make('validator/password')->isValid($pass, $error);`

Returns true if this is a valid password.

Parameters

string $pass

Return Value

bool

bool username(string $username)

Returns true if this is a valid username.

Valid usernames can only contain letters, numbers, dots (only in the middle), underscores (only in the middle) and optionally single spaces.

Parameters

string $username

Return Value

bool