Options for email validation.

interface IsEmailOptions {
    allowDisplayName?: boolean;
    allowUtf8LocalPart?: boolean;
    hostBlacklist?: string[];
    hostWhitelist?: string[];
    requireDisplayName?: boolean;
    requireTld?: boolean;
}

Properties

allowDisplayName?: boolean

Allows "Display Name " format if true. Defaults to false.

allowUtf8LocalPart?: boolean

Allows non-English UTF8 characters in the local part of the email address if true. Defaults to true.

hostBlacklist?: string[]

Rejects emails with domains in this blacklist. Defaults to an empty array.

hostWhitelist?: string[]

Rejects emails with domains not in this whitelist. Defaults to an empty array.

requireDisplayName?: boolean

Requires "Display Name " format if true. Defaults to false.

requireTld?: boolean

Requires a TLD in the domain if true. Defaults to true.