function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

validation rules to validate email address format

Hi, i have a custom text field which is to enter multiple email address separate by ' ; '.

Since it is a text field, there is possibility that user will enter wrong email address for eg: (missing '@'). is there any validation formula rule that can valiadte email address format can share here?

You can try a REGEX validation rule



Satish Kumar
Chandra PrakashChandra Prakash
Hi, hy.lim1.3897974166558203E12hy.lim1
Please Try This Validation Rule For Email Validation:

NOT(REGEX( Email_Id__c ,"[a-zA-Z0-9._-]+@[a-zA-Z]+.[a-zA-Z]{2,4}"))

Chandra Prakash Sharma
Bisp Solutions Inc.
Robert CravenRobert Craven
Does anyone have any updates to this as we have found a couple of scenarios that are not exluded by this validation, but get kicked back when trying to write into an Email field in SF...  one of those scenarios is someone that enters in ".."   as in  or any email address that includes a "," comma
Zeeshan FirozZeeshan Firoz
why there is 2,4 at the end of email validation rule?????
Sandeep DangiSandeep Dangi
{2,4}-after .(dot) domain name should be minium 2 letter and maximum 4 letter such as .com, .arpa
Bart BoersBart Boers

Hi all, 

I would suggest removing the 2,4 part because it's possible to come across a longer Top Level Domain name. Have a look at all the possible TLDs here:  

Also please make sure you allow the plus symbol. I regularly use this to label Gmail messages, but a lot of forms deny it. :)