UNPKG

@emailcheck/email-validator-js

Version:

Advanced email validation with MX records, SMTP verification, disposable email detection, batch processing, and caching. Production-ready with TypeScript support.

16 lines (15 loc) 765 B
import type { Cache } from './cache-interface'; /** * Validates if email domain is valid TLD */ export declare function isValidEmailDomain(emailOrDomain: string, cache?: Cache | null): Promise<boolean>; /** * Validates email-address format with a pragmatic (not strictly RFC-5322) regex. * * The local-part allow-list is `[a-zA-Z0-9._+'-]` — letters, digits, dot, * underscore, plus, apostrophe, hyphen. Characters that are technically valid * in RFC atext but virtually never appear in real mailboxes (`= ? ^ ~ { } | * * & % $ # ! / `` `) are rejected. Quoted local-parts (`"..."@example.com`) are * accepted as-is — they're rare but legal — but their interior is not parsed. */ export declare function isValidEmail(emailAddress: string): boolean;