jquery - formvalidation how to use remote only when needed -
i'm using this plugin validate form. in case of password have 2 validations. 1 regex , other 1 remote. regex inline.
username: { verbose: false, validators: { notempty: { message: 'please enter username.' }, remote: { type: 'post', url: 'validator.php', message: 'that username taken.', delay: 500 } } }
if entered username doesn't follow regex rule, don't want remote check exist username. right if user entered 'abc' username i'm getting regex error , 1 second later 'that username taken'. want show 1 message , on case regex error should appear.
i tried using callback don't know how continue there.
Comments
Post a Comment