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
Alex Christensen 1Alex Christensen 1 

Allow for spacing in RGEX rule

Hello,

I need to allow for spacing in this RGEX rule can someone identify what I need to remove? this is being used as a validation rule to prevent users from adding special characters in a contact. 

REGEX(FirstName, ".*([^a-zA-Z]+|\\s{2,}).*") || REGEX(LastName, ".*([^a-zA-Z]+|\\s{2,}).*")
AbhinavAbhinav (Salesforce Developers) 
Have you tried adding space as suggested in below link accepted answer?

https://developer.salesforce.com/forums/?id=906F0000000MNssIAG

Thanks!