check alpha numeric password in php using js : I am using to js to check if the password is alphanumeric, below is the code, not sure why but it is not throwing the alert when password is not alphanumeric.Please note I am using php version 5.


    if (!input_string.match(/^[0-9a-z]+$/))
      {
       alert("please enter alpha numeric password")
      }