Validation Regex - First letter with capital letter

Alessa
Mega Guru

Hello dear community, I need help:

 

I need that when a person enters their first name, he types it with the first letter capitalized and when he types their last name also the first letter is capitalized (Example: Jean Graham)  I have tried using Variable Validation Regex but without success. Can someone help me with this please?

 

 

Alessa_0-1666035731633.png

 

Validation Regex

 

Alessa_0-1666036085326.png

 

 

 

 

1 ACCEPTED SOLUTION

Yousaf
Giga Sage

Hi Alessa,
Not a very best regex but it is working for normal first and last name try this if you cannot use it with Variable Validation regex try it in client script

^([A-Z]{1}[a-z]{2,30}\s[A-Z]{1}[a-z]{2,30})

here is how you can use : Field validation: Regular Expressions 

 

Mark Correct and Helpful if it helps.


***Mark Correct or Helpful if it helps.***

View solution in original post

2 REPLIES 2

Yousaf
Giga Sage

Hi Alessa,
Not a very best regex but it is working for normal first and last name try this if you cannot use it with Variable Validation regex try it in client script

^([A-Z]{1}[a-z]{2,30}\s[A-Z]{1}[a-z]{2,30})

here is how you can use : Field validation: Regular Expressions 

 

Mark Correct and Helpful if it helps.


***Mark Correct or Helpful if it helps.***

Thank you very much!