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
KotiSFDCKotiSFDC 

To accept only characters i wrote Validation as bellow :NOT(REGEX(Name__c ,"[a-zA-Z]"))....... But its not allowing characters too

Best Answer chosen by KotiSFDC
sfdcMonkey.comsfdcMonkey.com
meaning of use * after [a-zA-Z] is that any character can repeat from from a to z in Name field.

if you got your answer then close your query by choosing best answer
Thanks

All Answers

Suraj TripathiSuraj Tripathi

Hi KotiSFDC,
Try using this Expression .
/^[a-zA-Z]*$/
Change the * to + if you don't want to allow empty matches.​

Hope it Helps you. Please mark this as solved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Regards ,
Suraj
KotiSFDCKotiSFDC
NOT ( REGEX ( Name__c,"[a-zA-Z]*" ))
it allows space, requirment is not allow space too
sfdcMonkey.comsfdcMonkey.com
hi this validation rule work fine in my org , please validate it again :
NOT ( REGEX ( Name__c,"[a-zA-Z]*" ))
User-added image
it's not allow the space
 
KotiSFDCKotiSFDC
Thank you piyus, can u plz tell me  why we can add * after [a-zA-Z]
sfdcMonkey.comsfdcMonkey.com
meaning of use * after [a-zA-Z] is that any character can repeat from from a to z in Name field.

if you got your answer then close your query by choosing best answer
Thanks
This was selected as the best answer