Jquery验证水印
我正在使用 jQuery 验证插件和 水印插件。我面临的问题是,当我将水印应用于也应用了验证的任何输入字段时,验证失败
例如:
<input type=text name=myinput class="required">
并且我在文档就绪功能中为此字段应用了水印:
$("#myinput ").Watermark("myinput ");
这是验证失败的示例案例因为 value=myinput
是为带水印的输入字段设置的。
I am using jQuery validation plugin and Watermark plugin. The problem I am facing is when i applied a watermark to any input field for which validation is also applied then validations are failing
For Example:
<input type=text name=myinput class="required">
and I applied a watermark for this field in document ready function:
$("#myinput ").Watermark("myinput ");
This is the sample case where validation is failing as value=myinput
is set for input field which is watermarked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后,我通过注册验证规则的方法并将其与该输入标记的类一起使用,得到了解决方案
,对于输入标记使用此
Finally i got the solution for this by registering a method for validation rules and using that along with the class for that input tag like
And for input tag use this