- Issue created by @darvanen
- ๐ฆ๐บAustralia darvanen Sydney, Australia
- ๐ฎ๐ณIndia maneesha binish
maneesha binish โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia vinayakmk47
I am using Drupal 10 with the Advanced Email Validation module (v2.0.2) and Webform (v6.2). I want to integrate the Advanced Email Validation module with a Webform email field, but I donโt see any option for the validation handler under the Form Validation section in the Webform field settings.
Hello,
I am using Drupal 10, the Advanced Email Validation module (v2.0.2), and Webform (v6.2). I am trying to validate a Webform email field using the Advanced Email Validation module but cannot find the validation handler in the Webform field settings.What Iโve Tried:
Installed the module via composer require drupal/advanced_email_validation.
Enabled the module with Drush: ddev drush en advanced_email_validation -y.
Cleared caches using ddev drush cr.
Configured the module under Configuration > Advanced Email Validation.
Expected Behavior:
I expected to see the Advanced Email Validation handler listed in the Form Validation section of the Webform field settings.Actual Behavior:
I can only see default options like Required, Unique, and Pattern.Environment:
Drupal: 10.x
Advanced Email Validation: 2.0.2
Webform: 6.2
Request:
How can I integrate the Advanced Email Validation module with a Webform email field? Am I missing a step?Thank you for your assistance!
- ๐ฆ๐บAustralia darvanen Sydney, Australia
Hi @vinayakmk47, did you check the issue linked in the issue summary? I believe your answer is there.
๐ฌ cannot figure how to integrate into Webforms Active
- ๐ฎ๐ณIndia vinayakmk47
@darvanen Yes I found That let me provide documentation step by step
Advanced Email Validation: Webform Integration Guide
Overview
The Advanced Email Validation module provides advanced email validation features, such as validating MX records, blocking disposable or public email providers, and supporting custom validation rules. This guide explains how to integrate the module with a Webform email field in Drupal 10.Pre-requisites
Drupal 10 installed and running.
The following modules enabled:
Webform (v6.2 or later)
Advanced Email Validation (v2.0.2 or later)
Steps to Integrate Advanced Email Validation with Webform
1. Install and Enable Required Modules
Ensure both Webform and Advanced Email Validation modules are installed and enabled.To enable modules via Drush:
ddev drush en webform advanced_email_validation -y ddev drush cr
2. Create or Edit a Webform
Go to Structure > Webforms.
Create a new Webform or edit an existing one:
Click on the Build tab of the Webform.
Add an Email or Email Confirm field if it is not already added.3. Add the Advanced Email Validation Handler
To integrate Advanced Email Validation:Navigate to the Handlers tab of your Webform:
Example URL:
https:///admin/structure/webform/manage//handlers
Replace with the machine name of your Webform (e.g., registration_form).
Click the Add handler button.From the list of available handlers, select:
Advanced Email Webform Validator.
Click Add handler to configure it4. Configure the Validation Handler
In the handler configuration form:Select the email fields where validation should be applied (e.g., "Email" or "Confirm Email").
If needed, enable Override site defaults to customize the validation rules for this specific Webform.
Customize the following validation rules as required:Validate email format.
Check MX records (to ensure the domain has valid mail servers).
Block disposable email domains (e.g., mailinator.com).
Block public/free email domains (e.g., gmail.com, yahoo.com).
Use a custom list of banned email providers.
Save the handler configuration.5. Test the Webform
Open the Webform in Preview mode.
Enter invalid email addresses (e.g., incorrect format, disposable domains).
Submit the form to ensure the validation rules are enforced.
Confirm the error messages appear as expected.6. Customize Validation Error Messages
If you want to customize the error messages:Go to Configuration > Advanced Email Validation:
Example URL:
https:///admin/config/system/advanced_email_validation
Modify the error messages for:Invalid email format.
Disposable email domains.
Public email domains.
Custom banned domains.
Save the changes. Advanced Email Validation: Webform Integration Guide
Introduction
The Advanced Email Validation module enhances email validation by checking MX records, blocking disposable or public email domains, and supporting custom validation rules. This guide explains how to integrate it with Webform email fields in Drupal 10.
Requirements
- Drupal 10 installed and running.
- Enabled modules:
- Webform (v6.2 or later)
- Advanced Email Validation (v2.0.2 or later)
Integration Steps
- Install and Enable Required Modules
- Ensure the necessary modules are installed and enabled. You can use Drush to enable them:
- drush en webform advanced_email_validation -y
- drush cr
- Add or Edit a Webform
- Navigate to Structure > Webforms.
- Create a new Webform or edit an existing one.
- Under the Build tab, ensure you have an Email or Email Confirm field added.
- Add the Advanced Email Validation Handler
- Go to the Handlers tab of the Webform:
- Example URL:
- /admin/structure/webform/manage/{webform_machine_name}/handlers
Replace {webform_machine_name} with your Webform's machine name (e.g., registration_form).
- Click the Add handler button.
- From the list of available handlers, select Advanced Email Webform Validator and click Add handler.
- Go to the Handlers tab of the Webform:
- Configure the Handler
- In the handler settings, select the email fields to apply validation (e.g., Email or Confirm Email).
- If needed, enable Override site defaults to apply custom rules for this Webform.
- Configure the following validation options as needed:
- Validate email format.
- Check MX records (to verify the domain has valid mail servers).
- Block disposable email domains (e.g., mailinator.com).
- Block public/free email domains (e.g., gmail.com, yahoo.com).
- Use a custom list of banned email providers.
- Save the handler configuration.
- Test the Webform
- Open the Webform in Preview mode.
- Test with invalid email addresses, such as:
- Incorrect format (e.g., user@domain).
- Disposable domains (e.g., mailinator.com).
- Public domains (e.g., gmail.com).
- Submit the form to ensure the validation rules are working.
- Verify that appropriate error messages are displayed.
- Customize Error Messages
To modify error messages for invalid emails:- Go to Configuration > Advanced Email Validation:
- Example URL: /admin/config/system/advanced_email_validation.
- Adjust the error messages for:
- Invalid email format.
- Disposable email domains.
- Public email domains.
- Custom banned domains.
- Save your changes.
- Go to Configuration > Advanced Email Validation: