harungecit/php-email-validator
A lightweight PHP email validator that checks addresses for correct syntax and common formatting rules, helping you reject invalid input in forms, signups, and APIs. Install via Composer and drop it into any PHP project or framework.
isDisposableDomain() and block_subdomains let you apply different policies at different funnel steps without a second vendor.isSpoofed() (homograph detection) opens up a security story beyond disposable addresses — impersonation in account recovery and support flows. getListStatistics() and the explainable checkDisposable() result (matched domain, source, subdomain match) give you observability for measuring filter quality, which is what you need to justify tightening or loosening policy later.main with weekly patch releases, plus runtime sync (ListSynchronizer / email-validator sync) with atomic locked writes, append-only default, rejection of HTML/empty responses, and allowlist never written — this outsources an operational task (list curation) that would otherwise be an on-call burden. Adopting it is a decision to not staff that work.Adopt when:
check|validate|sync|stats) for cron jobs and CI.Look elsewhere or defer when:
lists.custom_allowlist, report upstream," you'll end up with a stale or over-permissive config.sync.* config and file paths first).Upgrade-specific cautions for the PM to flag to engineering: behavior changes are backward compatible at API level but not necessarily at product level — (1) custom_blocklist / addToBlocklist() now take precedence over the bundled allowlist, so your own additions can now override upstream protections; (2) the ~15× larger list will surface new blocks on real users; plan a canary/log-only rollout and monitor; (3) in Laravel, smtp.from_domain now reads EMAIL_VALIDATOR_SMTP_FROM_DOMAIN and custom typo mappings are now additive rather than replacing built-ins — both can silently change behavior in configured environments.
For executives: This upgrade makes our signup filtering substantially stronger at essentially zero marginal cost. Coverage of known disposable domains goes from ~9k to ~137k, and — critically — the package now systematically suppresses false positives: it excludes public suffixes, the most popular 100k domains, typosquats of major providers, and subdomains of a 237-domain allowlist covering ISPs, enterprises, and privacy relays like SimpleLogin and Proton Pass. That means we block more fake accounts without blocking real customers, which is the trade-off that has historically made teams avoid aggressive filtering. The list refreshes daily with weekly releases and can sync at runtime, so we stop paying engineers to curate blocklists. It's backward compatible, framework-agnostic (Laravel, Symfony, CodeIgniter, CakePHP, Yii, Phalcon), and adds no per-request memory or latency thanks to an OPcache-compiled index. Recommended decision: adopt with a logged-only canary for one to two weeks, then enforce at signup — and assign a named owner for allowlist exceptions so legitimate-user false positives get resolved quickly rather than becoming a support backlog.
For engineering: Low integration risk, high leverage. Detection is now explainable (checkDisposable() returns matched domain, source, and whether it matched via subdomain), plus isSpoofed() for homograph attacks and getListStatistics() for observability — instrument these so we can measure filter quality and defend policy changes with data. Laravel gives us rule objects, a Blade directive, Artisan commands, scheduled sync, and Laravel 13 support; the vendor/bin/email-validator CLI covers sync and stats outside the request cycle. Sync is append-only by default with atomic, locked writes, rejects HTML/empty responses, and never writes allowlisted domains — but we still need to pin versions and watch releases. Three behavior changes to verify before rollout: user-supplied blocklist entries now override the bundled allowlist; smtp.from_domain reads EMAIL_VALIDATOR_SMTP_FROM_DOMAIN; custom typo mappings are now additive. Plan the ~15× larger list as a behavior-change event, not a patch: log-only mode first, review the top blocked domains against our user base, then enforce.
How can I help you explore Laravel packages today?