Help

Form: Email input validation

Topic Labels: Views
7515 7
cancel
Showing results for 
Search instead for 
Did you mean: 
Hirday_Gupta
4 - Data Explorer
4 - Data Explorer

Email fields in forms don’t seem to be validated very strongly. My form keeps accepting entries like “name. lastname@host.com” (notice the space).

How do I prevent the form from accepting badly formatted emails like this?

7 Replies 7

That might be a byproduct of the fact that you can add multiple email addresses to an email field, as long as they are separated by a comma (or a comma and a space).

I think that if you want to catch badly-formatted email addresses, you would need to create a formula field and setup the formula to return some word (or even an emoji such as :x: ) to let the user know that the email address was badly-formatted.

You could also create a JavaScript which you could manually run to check all of your email fields, but that would require manually running the script every time you want to check.

Oh, sorry, you’re referring to a form.

Using Airtable’s built-in forms, I don’t think you can stop them from submitting a form with a badly-formatted email address (for the same reason as above), so may want to switch to an external form building tool that supports that.

However, if you stick with Airtable forms, there is a tool that can help you out.

AFTER they submit the form, you could use this tool to display a preview to them of what they just submitted, and it could display the :x: (or some other warning) if they submitted an invalid email address, and then they have the option to go back and modify the form:

If they don’t go back and edit the form to fix their mistake, then you would be able to see the :x: in your own Airtable system… you could even create a special view that filters only the records that have the :x: .

They’re currently not validated at all. If validation is important, I second the suggestion from @ScottWorld to consider using a third-party form tool like TypeForm or JotForm. There are probably more, but those two come to mind right away, and both support email validation. JotForm also has a built-in option to connect to Airtable for form submission, and this is available in the free JotForm account. TypeForm has a similar feature, but it requires their lowest paid tier.

Had a slight workaround. But could be improved.

  1. Create a "single select" field displayed as a list with no options. (Basically a text box in your form)
  2. Configure the field in your form:
    Conditions if "Email" field does not contain "@" or "." & if field contains a " " (space)
    Make the field "required"
  3. You can add text saying something like "Error. Please check that your email address is entered correctly"

It's not the best workaround. If I could somehow implement ALL these conditions in

Email address

What makes it invalid

@domainsample.com

The recipient's name is missing.

johndoedomainsample.com

The @ symbol is missing between johndoe and domainsample.com.

john.doe@.net

The domain name (domainsample) is missing after the @ symbol and before the top level domain (.net).

john.doe43@domainsample

The top level domain (.co.uk) is missing.

Taken from validity.com


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/

How can an email field not be validated? That is so basic?!

Agreed, I'm going to put in a feature request. I was surprised to find that this was not automatically when putting an email field on a form.

HannesK-ME
7 - App Architect
7 - App Architect

Hey there, I just wanted to point out that validating email addresses is very straightforward using our miniExtensions Form. Right out of the box email fields are validated to check for a valid format. Alternatively, you could also set up RegEx validation in a single line text field, for example, which can achieve the same result with more flexibility. ChatGPT is really good at creating the correct RegEx if you just describe the format that you require.

Screenshot 2024-11-08 at 14.30.15.jpg