[英]custom validator for jQuery Validation Engine
The Name field in a form has a default value of "Name" (obviously). 表单中的名称字段有“名”(显然)的默认值。 I'm trying to create a custom validator in case the user does not replace "Name" with own name.
我正在尝试创建一个自定义验证器,以防用户未使用自己的名称替换“名称”。
I've put the following in the jquery.validationEngine-custom.js file. 我将以下内容放入jquery.validationEngine-custom.js文件中。
"notDefaultName":{
"regex":/^(Name.+|(?!Name).*)$/,
"alertText": "* Please enter your name"
},
, but it doesn't trigger when user submits with default value. ,但是当用户使用默认值提交时它不会触发。
Any ideas? 有任何想法吗?
您可以在单击提交后立即指定触发的功能吗
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.