Looking to stop people putting initials in the First / Last name fields, plus any special characters that you would not associate with a name. I've got something, although it is coming unstuck on names like McGowan or MacGowan. I understand why although I'm stumped to provide a solution.
This is what I have:
AND(
$User.ProfileId <> '00e30000001jDdz',
OR(
LEN(FirstName ) <=1,
MID(FirstName ,2,1) = " ",
NOT(
REGEX(
FirstName,
'([A-Z][a-z]*)([\\s\\\'-][A-Z][a-z]*)*'
)
)
)
)
The UserProfile is to let a System Admin do what they want. The Len & Mid bits are to stop initials, or people putting in "S J ".
There is probably a more elegant way of doing this but I'm rather fresh to REGEX.
Any suggestions on how to better this?
Thanks,