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 :

  1. @$%^^@
  2. 1231232

but should not throw error if string contain :

  1. hi@
  2. hi
  3. hi@1
  4. hi4
  5. @hi

simply use regex allow alpha bates compulsory

/.*[a-z]+.*/i 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -