You need to sign in to do that
Don't have an account?

Accept only specified special symbols
Hi,
We have a email field which should accept only @ . - as a special symbols if any other special symbols are entered it must not allow please suggest me how to add this valdiation
Thanks
Sudhir
We have a email field which should accept only @ . - as a special symbols if any other special symbols are entered it must not allow please suggest me how to add this valdiation
Thanks
Sudhir
Please try below in your validation rule
NOT(REGEX ( UPPER ( Email_Domain__c ) ,"^[A-Z0-9.-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$"))
Let me know for any issues.
Thanks
Arpit
Please mark this answer as SOLVED and BEST ANSWER if it helps you.
All Answers
I am currently using this belwo valdiation which is working good will not expect any specical character
Now we have a requirement to allow few special character like @ . - Only these special characters should be allowed.
Please suggest me.
Thanks
Sudhir
You can try below rule
REGEX ( UPPER ( Email_Domain__c ) ,"^[A-Z0-9._%+-/!#$%&'*=?^_`{|}~]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$")
For more details you refer below link for the same
https://help.salesforce.com/articleView?id=000170904&language=en_US&type=1
Let me know for any issues.
Thanks
Arpit
Please mark this answer as SOLVED and BEST ANSWER if it helps you.
Example : When i include ##@gmail.com it is accepting It must accept only if it has - . @ symbols if any other symbols are enterd it must not accept.
I Modified little adding ISCHANGED to the code. Please suggest to fix this issue.
Thanks
Sudhir
Please try below in your validation rule
NOT(REGEX ( UPPER ( Email_Domain__c ) ,"^[A-Z0-9.-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$"))
Let me know for any issues.
Thanks
Arpit
Please mark this answer as SOLVED and BEST ANSWER if it helps you.
It is not working tried your formula Please suggest
Thanks
Sudhir
Thanks
Sudhir
Appologies it is working I didn;t test properly.
Thanks
Sudhir
Thanks
Arpit