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
iSfdciSfdc 

Regex validation A-Z

I wanted to create a validation rule with regex to not allow any A-Z a-z in a text area field. I tried multiple occurrences they seem to work only for the first set of characters.
 Any help is appreciated.
Nishad KNishad K
Hi
Use the  below Regex:
REGEX(textareafieldName ,"([a-zA-Z- ])*"))
Regards,
 
iSfdciSfdc
Thanks Nishad, this works when all the characters are alphabets, when I enter numbers and insert an alphabet it fails. My field should allow only numbers and any special characters. Whenver it sees A-z it should display an error.
Nishad KNishad K
Okey, use this one 
NOT(REGEX(textareafieldName ,"([a-zA-Z- ])*")))