madeitbelgium/laravel-email-domain-validation
A Laravel validation package that checks email domains via DNS/MX records, helping reject invalid or undeliverable addresses. It adds a simple rule for form requests and validators to improve signup and contact form data quality.
Architecture fit. The package is a standard Laravel extension: a service provider that registers a custom validation rule (and likely a config file / facade) for checking the domain portion of an email address. It sits at the presentation/validation boundary of the application, not in the domain core. That is architecturally clean — it is a policy enforcement point (reject disposable/invalid domains) with no persistence, no schema, and no event surface. The main architectural decision is whether this check belongs in the validator at all or in a dedicated "email hygiene" service; for a single Laravel monolith, the validation rule is the right altitude.
Integration feasibility. High. Composer install plus package auto-discovery, then apply the rule to specific form requests. Realistic effort: an afternoon for a senior Laravel developer, including a staging test. There is no infrastructure prerequisite beyond outbound DNS, which Laravel apps already need for native email:dns.
Technical risk. Several items, in order of materiality:
email:dns (and email:spoof, email:strict) already performs DNS validation. The incremental value here must be in disposable/free-provider detection, allow/deny lists, or result caching. If the package is only re-implementing MX lookups, it is not worth the dependency.Key questions. What exactly does it check (syntax, A/MX, disposable list, free provider, SMTP probe)? Does it cache DNS results, and where? What is its behavior on DNS timeout or SERVFAIL — reject or allow? Does it handle IDN/punycode and subdomains? Does it make any call to an external HTTP API (privacy/DPA implications)? Which Laravel and PHP versions are supported, and is there a test suite with DNS mocked? Is the disposable list bundled, fetched, or configurable? Does the last-release date reflect genuine activity or a version bump?
Stack fit. Fits any Laravel app on a currently supported PHP version, assuming the package's composer.json constraints are honest. It should be treated as a leaf dependency — nothing else in the stack should depend on it.
Migration path. Purely additive; no data migration, no schema change, no backfill. Existing users are unaffected because validation only runs at the points where the rule is applied. This makes it easy to introduce behind a config flag (e.g. EMAIL_DOMAIN_VALIDATION_ENABLED) so it can be toggled off in production without a deploy.
Compatibility. Two checks before adoption: (a) resolve the package constraint set against the app's installed Laravel/PHP matrix in a throwaway branch, and (b) confirm it does not conflict with or duplicate the email rule configurations already in use. Note the LGPL constraint may also require excluding the package from any bundled/compiled distribution artifacts.
Sequencing. Recommend:
Maintenance. Low ongoing code maintenance, moderate dependency maintenance. The realistic posture is: pin the version, own a fork if the upstream goes quiet, and subscribe to the repo for security advisories. The disposable-domain list — whether bundled or fetched — is the one artifact that requires a recurring refresh owner and a cadence. Assign that explicitly; unowned lists silently rot.
Support. Community-only. No SLA, no vendor escalation. Acceptable given the small blast radius, but the team must be capable of reading and patching the source. That is a genuine competency requirement, not a formality.
Scaling. Cost scales linearly with the number of validation events, and each uncached check is a network round trip. At registration-scale traffic, uncached DNS lookups will show up in p95. Mitigate with a cache keyed on the domain (not the full address), long TTL, and a negative-result cache. For bulk operations — imports, backfills, list cleansing — this should run in a queued job, never inline.
Failure modes. Ranked by business impact:
Ramp-up. Trivial for anyone fluent in Laravel — under a day to first productive use. The real ramp-up cost is not the package but the surrounding decisions: the fail-open/fail-closed policy, the cache design, the list-refresh ownership, and the LGPL clearance. Budget roughly one engineer-week end to end including legal and the staging measurement, not the one afternoon the code change implies.
Overall. The 9.07 score and 19 stars are in tension. The score likely reflects functional fit, which is genuinely good; the star count reflects ecosystem traction, which is thin. The recommendation is conditional: adopt only if source review confirms it delivers something native Laravel validation does not, accept that you are effectively adopting a fork-in-waiting, and gate the rollout behind instrumentation so false rejections are visible before they cost signups.
How can I help you explore Laravel packages today?