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
Michael Robertson 9Michael Robertson 9 

Checking First Name If It Is Capitalized

Need to check to see if the first character of the first name is capitalized. The extra part is if there is a non-alpha character before the first letter, like *tim. In this case I want to check to see if the first letter is capitalized. This is what I have, but it is not working... This is for a workflow to check before running.
This is a validation rule I need it to evaluate to true if the first letter is not capitalized or if there is a non-alpha character, the second letter is not capitalized. Any help would be appreciated.
SarvaniSarvani
Hi Michael,

Try below validation rule. I have considered field as (Name). You can replace with your standard or custom fields. I have tested it and worked fine.
(NOT(IsBlank(Name)) &&
NOT(REGEX(Name, "[A-Z]{1}[a-z]{1}.*")))||
NOT ( REGEX ( Name,"[a-zA-Z ]*" ))
Above rule checks below three conditions:
1. First Character in the field is in Upper Case.
2. Second character is in lower Case.
3. Only allows letters (Gives error if there is non-alpha character).

Will work in below example scenarios:
Albert, Jhonson, Linda

Will give error in these cases: #Alex, Ja9ck, Alexand@ra, Tommy*

Hope this helps! Please mark as best if it does

Thanks
 
Michael Robertson 9Michael Robertson 9
Thanks... That helps.
Michael Robertson 9Michael Robertson 9
Is there also a way to look for non US characters? Like á,ã,ä,ç,é,í,ó,ö,ô,ú,ø, but would pick up if something new were to come out?