Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

Advanced Email Validation

949 sites Security covered Drupal 10–11
View on drupal.org

This module provides advanced email validation using configurable rules, including checking for valid MX records, preventing disposable or free email addresses, and blocking specific domains. It can be integrated with user accounts and webform fields, and offers developer tools for custom validation logic.

Uses the open-source stymiee/email-validator library to validate email addresses using advanced, configurable rules.

Features

⚠️ Error message control

  • Configure custom error messages for each type of validation failure.
  • Translate the error messages with the Configuration Translation core module.

😇 User accounts

Validate the primary email address of users when they are created, or when the email address is changed. By default both are enabled.

(1.x acts on all changes not just edits to the primary email)

📝 Webform fields

  • Use the included Webform validation handler to use this validation system on an any email field in a webfom.
  • Optionally override the global setting for each handler.

🧑🏽‍💻 Developer tools

  • Use the included validation Constraints on any email/string field on any entity to apply the rules from this module.
    • One for new entities
    • One for when the field itself is changed
  • Use the provided Service to easily utilise the validation tools in custom code.
  • Subscribe to the validation event (3.x) to accept or reject addresses with your own logic, for example an allowed-domains list, or to change the messages.


Available Rules

Validate MX

If configured, the domain name will be validated to ensure it exists and has MX records configured. If the domain does not exist or no MX records exist the odds are the email address is not in use.

Restrict Disposable Email Addresses

Many users who are abusing a system, or not using that system as intended, can use a disposable email service who provides a short-lived (approximately 10 minutes) email address to be used for registrations or user confirmations. If configured, the domain name will be validated to ensure it is not associated with a disposable email address provider.

You can add domains to this list if you find the public list providers do not have one you have identified in their lists, or you can choose to only use your custom list of providers.

Restrict Free Email Address Providers

Many users who are abusing a system, or not using that system as intended, can use a free email service who provides a free email address which is immediately available to be used for registrations or user confirmations. If configured, the domain name will be validated to ensure it is not associated with a free email address provider.

You can add domains to this list if you find the public list providers do not have one you have identified in their lists, or you can choose to only use your custom list of providers.

Restrict Banned Domains

If you have users from a domain abusing your system, or you have business rules that require the blocking of certain domains (i.e. specific public email providers like Gmail or Yahoo mail), you can block them in the configuration.

Library versioning

The 3.x branch requires version ^2.1.0 of the third-party library; the 1.x and 2.x branches require ^1.1.4. In both cases this is a minimum rather than a pinned version, which leaves you free to upgrade the library to new releases. If you wish to pin a particular version of the library you can do so by requiring a specific version in your own project/composer.json.

This module will update the required minimum version if the library has a security release or addresses features or bugs relevant to this module.

If the library goes up a major version, so will this module. That is what happened here: library 2.x is supported on the module's 3.x branch.

Similar Modules

None of the above modules allow you to optionally reject emails from disposable or free email providers.

Depends on

Dependencies of the latest stable release

  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Oct 2024
Latest release
3 months ago
Releases (12 mo)
4 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.3.0 Stable 10–11 Jun 10, 2026
2.1.0 Stable 10–11 Jun 10, 2026
3.0.0-beta1 Pre-release 10–11 Jun 10, 2026
3.x-dev Dev 10–11 Jun 8, 2026
2.0.2 Stable 10–11 Oct 21, 2024
2.0.1 Stable 10–11 Oct 19, 2024