javascript - How to create regex to not to accept only special character or number -
i how create regex not accept special character or number. eg:
it should throw error if string contain :
- @$%^^@
- 1231232
but should not throw error if string contain :
- hi@
- hi
- hi@1
- hi4
- @hi
simply use regex allow alpha bates
compulsory
/.*[a-z]+.*/i
Comments
Post a Comment