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
mahesh kumar 117mahesh kumar 117 

I have a text field named"Emp_name" so that only characters are allowed not numbers,special characters

Is there any formula for this field

User-added image

Thanks&regards 
Mahesh
Best Answer chosen by mahesh kumar 117
shephalishephali
Hello Mahesh,

Try below:
SOLUTION: for name like Neha Sharma :  NOT(REGEX(Name,"([A-Z][a-z]*)([\\s\\\"-][A-Z][a-z]*)*$")) 
SOLUTION: for name like Neha sharma :   NOT(REGEX(Name,"([A-Z][a-z]*)([\\s\\\"-] [a-z]*)*$"))
SOLUTION: for name like Neha :  NOT(REGEX(Name,"([A-Z][a-z]*) $")

Thanks
Shephali

All Answers

VineetKumarVineetKumar
Try using REGEX function :
Compares a text field to a regular expression and returns TRUE if there is a match. Otherwise, it returns FALSE. A regular expression is a string used to describe a format of a string according to certain syntax rules.
( REGEX( Emp_name__c , "[a-zA-Z]"))
https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_functions_i_z.htm
shephalishephali
Hello Mahesh,

Try below:
SOLUTION: for name like Neha Sharma :  NOT(REGEX(Name,"([A-Z][a-z]*)([\\s\\\"-][A-Z][a-z]*)*$")) 
SOLUTION: for name like Neha sharma :   NOT(REGEX(Name,"([A-Z][a-z]*)([\\s\\\"-] [a-z]*)*$"))
SOLUTION: for name like Neha :  NOT(REGEX(Name,"([A-Z][a-z]*) $")

Thanks
Shephali
This was selected as the best answer
shephalishephali
Please mark it as solution if you get it.
mahesh kumar 117mahesh kumar 117
Thanks