class FilterEmailValidation implements EmailValidation (View source)

Properties

protected int|null $flags

The flags to pass to the filter_var function.

Methods

void
__construct(int $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

void __construct(int $flags = null)

Create a new validation instance.

Parameters

int $flags

Return Value

void

static FilterEmailValidation unicode()

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

Return Value

FilterEmailValidation

bool isValid(string $email, EmailLexer $emailLexer)

Returns true if the given email is valid.

Parameters

string $email
EmailLexer $emailLexer

Return Value

bool

InvalidEmail|null getError()

Returns the validation error.

Return Value

InvalidEmail|null

array getWarnings()

Returns the validation warnings.

Return Value

array