Question

I have question regarding the use of jquery 1.8, jquery validation 1.10 and placeholder 2.0.7 (https://github.com/mathiasbynens/jquery-placeholder). I noticed that any version IE skipped the validation of password fields if the placeholder plugin was used. Does anybody have solution for this?

Was it helpful?

Solution

I found out how to solve it.

Just set $("form").validate({ignore:[], ...}); where "form" should be your selector and ... is your options.

The reason for the error is because jquery validation skips validating inputs set to display:none. Placeholder plugin sets password elements to display:none while not focused that is why it passed the validation. If you set ignore to [] it will override the default behavior of jquery validation which is not to validate display:none elements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top