Check whether the input is right for ajax verify request