I need to restrict our email domain field so it doesn't contain special characters and multiple domains are separated by ; and also end in ;
So multiples look like this: abc.abc;def.def;ghk.ghk;
Single domains don't need to end in ;
This is what I have so far:
AND(
NOT(ISBLANK( Email_Domains__c)),
OR(
CONTAINS( Email_Domains__c ,","),
CONTAINS( Email_Domains__c ," "),
CONTAINS( Email_Domains__c ,"*"),
CONTAINS( Email_Domains__c ,":"),
NOT(
AND(
CONTAINS( Email_Domains__c ,";"),
RIGHT( Email_Domains__c ,1)=";"
))))
Trouble is, a single email domain of abc.abc is rejected unless i add ; at the end.
What can I do to fix it?
Thanks in advance!
4 respuestas