0
  • Problem with browsers Auto suggestions.

  • For example prefilling the user's address based on earlier user input...

  • Some conditions

  • autocomplete="on".

  • i am using "jQuery Validation Plugin 1.11.1".

    I am filling the wrong data and click the submit, form validations trigger next i filled date with browsers Auto suggestions this case form validations not trigger. Any buddy know update the solution. [Fiddle][1].

First click the submit button next enter the values you observe. next time click auto suggestion or auto complete -> error message still exit up to focus out...

[2]: http://jsfiddle.net/thiru715/57oyLjzh/2/
` `
    

 [1]: https://i.stack.imgur.com/PDJv8.png
Community
  • 1
  • 1
user1931467
  • 11
  • 1
  • 7
  • 1
    You should provide your code and HTML. Also it will be better to provide [jsfiddle](http://jsfiddle.net), which represents the problem. – Regent Sep 18 '14 at 08:12

1 Answers1

0

The validation for each field happens when you get out of that field (blur) and on other events (keyup, form submit...)

You'd have to hack it to work, for example, customize your jQuery code so that whenever you leave any field (and thus autocompletation can have happened) the validation is trigerred for all the fields.

See this to learn how to manually trigger the validation.

You can also try to do it using the change event. I'm not sure if it will work.

Please, add this to your fiddle and test it:

 $("#registerform input").change(function() {
      $(this).valid();
  }); 

I'm not able to test it, because I cannot trigger the autocomplete.

If it doesn't work, try this:

 $("#registerform input").blur(function() {
      $("#registerform input").valid();
  }); 
Community
  • 1
  • 1
JotaBe
  • 38,030
  • 8
  • 98
  • 117