How to enable domain validation (blocked domains) on a Mautic form email field¶
Mautic lets you reject form submissions from specific email domains directly at the form field level. This is useful when you want to prevent contacts from signing up with free webmail addresses (like gmail.com or hotmail.com) or competitor domains. The validation fires client-side on submit, showing an inline error before the data ever reaches Mautic, so no partial contact is created. The blocked domains list is configured per-form field, meaning setting up for every form is required.
Requirements¶
- Access to the Mautic instance
- The form must already exist (or you're creating a new one)
- A list of the domains you want to block (e.g.
gmail.com,yahoo.com,hotmail.com)
Step-by-step guide¶
- Navigate to
Components→Formsin the top navigation menu. - Open the form you want to edit by clicking its name, then click the
Editbutton. - Locate the email field in the form canvas. If no email field exists yet, insert the
Emailfield type from the dropdown. - Click the email field to open its settings.
- Open the
Validationtab. - Find the
Domain name submission filtertoggle and set to Yes. This feature gets the list of blocked domains from the Configuration page.- Define a message like “Using a business email is required”.
- Save the field settings by clicking
AddorUpdate. - Save and close the form.
How do I know if I did this correctly?¶
- Submitting the form with a blocked domain email shows an inline validation error before the form is sent
- Submitting with a non-blocked domain email goes through normally
- No new contact is created in Mautic when the blocked domain error fires