I have a n input for profile name with validation and i want to add optional white space in regular expression
if (!/^[a-zA-Z]+$/.test(values.profile_name) // show error
How can I fix my expression?
>Solution :
Just add it to the list
^[a-zA-Z\s]+$
https://regex101.com/r/z4joUY/2