The advanced email validation settings form, displaying available options as described in the module summary.

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.


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

This module requires version ^1.1.4 of the third-party library rather than pinning a particular 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.

Similar Modules

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

Supporting organizations: 
contribute to development and maintenance
created the Webform validation handler

Project information

Releases