SharePoint: Email Format Validation

Task

Validate the entry to a field requesting an email. This is using the Column Validation option within the creation of a column on a list.

Solution

Basically what we are doing is just ensuring that an “@” symbol and the “.” are within the email that they are attempting to submit. You will need a list and either create or edit a column as below:

Requirement: There are 2 different formulas based on whether the column is required or not, so pick the correct one below.
Required Field Formula:
=AND(ISERROR(FIND(" ",EMAILTOBECHECKED,1)),IF(ISERROR(FIND("@",EMAILTOBECHECKED,2)),FALSE,AND(ISERROR(FIND("@",EMAILTOBECHECKED,FIND("@",EMAILTOBECHECKED,2)+1)),IF(ISERROR(FIND(".",EMAILTOBECHECKED,FIND("@",EMAILTOBECHECKED,2)+2)),FALSE,FIND(".",EMAILTOBECHECKED,FIND("@",EMAILTOBECHECKED,2)+2)
Optional Field Formula:
=IF(LEN(EMAILTOBECHECKED)<=0,TRUE,AND(ISERROR(FIND(" ",EMAILTOBECHECKED,1)),IF(ISERROR(FIND("@",EMAILTOBECHECKED,2)),FALSE,AND(ISERROR(FIND("@",EMAILTOBECHECKED,FIND("@",EMAILTOBECHECKED,2)+1)),IF(ISERROR(FIND(".",EMAILTOBECHECKED,FIND("@",EMAILTOBECHECKED,2)+2)),FALSE,FIND(".",EMAILTOBECHECKED,FIND("@",EMAILTOBECHECKED,2)+2)
User Message: This can be any message you want the user to see when the above code returns false meaning it is not a valid email. I use something simple like “Please enter a valid Email address
3-8-2019 7-03-17 AM

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.