placeholder issue with jQuery Validate

前端 未结 9 699
时光说笑
时光说笑 2020-12-31 19:10

I noticed today that we have an issue with jquery Validate when used in conjunction with placeholder text.

Example:

&
9条回答
  •  自闭症患者
    2020-12-31 20:00

    I found that if you add custom rules ie: email:true, then the validation is not ignored. So if you look in additional-methods.js which comes bundled with the jquery validation download, there is a rule called alphanumeric. This has all of the default required functionality. Just use this custom rule and it should work. I am using http://widgetulous.com/placeholderjs/ for placeholder support on older browsers. Cheers

提交回复
热议问题