interface EmailOptions {
    allowDisplayName?: boolean;
    allowIPDomain?: boolean;
    allowUTF8LocalPart?: boolean;
    blacklistedChars?: string;
    hostBlacklist?: string[];
    hostWhitelist?: string[];
    ignoreMaxLength?: boolean;
    requireDisplayName?: boolean;
    requireTLD?: boolean;
}

Hierarchy

Properties

allowDisplayName?: boolean

If true then display names are allowed (Display Name ).

false
allowIPDomain?: boolean

If true then IP addresses are allowed in the host part.

false
allowUTF8LocalPart?: boolean

If false then` any non-English UTF8 character in the local part of the email address are forbidden.

true
blacklistedChars?: string

Reject emails that include any of the given characters in the name part.

hostBlacklist?: string[]

If the part of the email after the @ symbol matches one of the strings defined in it then the validation fails.

hostWhitelist?: string[]

Validation succeeds, only if the part of the email after the @ symbol matches one of the strings defined in it.

ignoreMaxLength?: boolean

If true then the standard max length of an email is ignored.

false
requireDisplayName?: boolean

If true then display names are required (Display Name ).

false
requireTLD?: boolean

If false then addresses without a top-level domain are allowed.

true