class FilterEmailValidation implements EmailValidation

Methods

__construct(int|null $flags = null)

Create a new validation instance.

unicode()

Create a new instance which allows any unicode characters in local-part.

bool
isValid(string $email, EmailLexer $emailLexer)

Returns true if the given email is valid.

InvalidEmail|null
getError()

Returns the validation error.

array
getWarnings()

Returns the validation warnings.

Details

at line 18
__construct(int|null $flags = null)

Create a new validation instance.

Parameters

int|null $flags

the flags to pass to the filter_var function

at line 26
static FilterEmailValidation unicode()

Create a new instance which allows any unicode characters in local-part.

Return Value

FilterEmailValidation

at line 34
bool isValid(string $email, EmailLexer $emailLexer)

Returns true if the given email is valid.

Parameters

string $email
EmailLexer $emailLexer

Return Value

bool

at line 44
InvalidEmail|null getError()

Returns the validation error.

Return Value

InvalidEmail|null

at line 54
array getWarnings()

Returns the validation warnings.

Return Value

array