Webflow Forms

Blocking Free Email Provider Addresses

No items found.

Sometimes, you want to block non-work email addresses, from free providers, since they're more likely to be "throwaway" addresses.

A full implementation of this is a bit complex, but a basic implementation using Patterns is easy;

So how do we prevent that?

In addition to setting the field type to email, add the following custom attribute;

pattern = ((?!@(gmail.com|yahoo.com|hotmail.com)).)*

You should be able to enter any email, except those ending in @gmail.com, @yahoo.com, or @hotmail.com.

Add more to the list with another pipe and domain, e.g. |outlook.com.

Best Practices

Combine techniques;

  1. In Webflow's Designer, set the input type to email
  2. Also add the custom pattern
  3. Optionally, make the field required

Overview
Customizing Input Controls
Customizing Radio Buttons & Checkboxes
Intro
100
Input Number & Decimal Places
Intro
101
WIP
Numeric Range Sliders
Intro
102
WIP
Multi-Select Dropdown
Intro
104
Forms Validation
Forms Validation Basics
Intro
200
Input Types
Intro
201
Using Regex Patterns in Forms Validation
Intro
202
Custom Validation Errors
Adv
203
Forms Validation Techniques
Validating Emails
Intro
301
Blocking Free Email Provider Addresses
Intro
302
Requiring Checkboxes
Intro
302
International Phone Numbers
Int
6:50
304
Databinding
Databinding CMS Collections to a Form Select
8:42
401
Forms Validation Techniques
3rd Party Form Handlers
Intro
401
Making Forms Dynamic
Displaying Form Parts Conditionally
14:36
501
Multi-Step Forms
Intro
501
SPAM Blocking Techniques
CAPTCHA Approaches
601
No items found.
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.