-3

I am trying to create a react(javascript) form, In that one field should allow all values (Uppercase letters, Lowercase letters and special characters) but not numbers.

Is there any regex or any other solution?

Thanks in advance.

Danielprabhakaran N
  • 530
  • 1
  • 7
  • 16

1 Answers1

-1

You can simply check that a string DOESN'T contain numbers using regex \d which matches all numbers:

!(/\d/.test(string))