Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Advanced Email Validation

Security covered Under active development 1,013 sites

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.

Drupal 10โ€“11

Ask your assistant about Advanced Email Validation

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
13
Tracked since
Jun 2023
Latest release
4 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP 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
2.0.0 Stable 10โ€“11 Jul 23, 2024
2.0.0-rc1 Pre-release 10โ€“11 May 26, 2024
2.x-dev Dev 10โ€“11 Apr 24, 2024
1.2.1 Stable 10โ€“11 Apr 17, 2024