Home  >  Article  >  Backend Development  >  Please help with jquery validation related issues, thank you! !

Please help with jquery validation related issues, thank you! !

WBOY
WBOYOriginal
2016-12-05 13:44:201055browse

<code>$("#password").formValidator({onshow:"请输入8-12个字符",onfocus:"请填写密码",oncorrect:"输入正确"}).inputValidator({min:8,max:12,onerror:"请输入8-12个字符"}).regexValidator({ regexp:'^(?![a-zA-Z]+$)(?![a-z0-9]+$)(?![a-z!@#\\$%]+$)(?![A-Z0-9]+$)(?![A-Z!@#\\$%]+$)(?![0-9!@#\\$%]+$)[a-zA-Z0-9!@#\\$%]+$',onerror:"(字母大写,字母小写,数字,特殊字数)中任意3类"});
</code>

jquery正则校验 regexValidator这么写对吗,为什么正则表达式,校验不符合预期

回复内容:

<code>$("#password").formValidator({onshow:"请输入8-12个字符",onfocus:"请填写密码",oncorrect:"输入正确"}).inputValidator({min:8,max:12,onerror:"请输入8-12个字符"}).regexValidator({ regexp:'^(?![a-zA-Z]+$)(?![a-z0-9]+$)(?![a-z!@#\\$%]+$)(?![A-Z0-9]+$)(?![A-Z!@#\\$%]+$)(?![0-9!@#\\$%]+$)[a-zA-Z0-9!@#\\$%]+$',onerror:"(字母大写,字母小写,数字,特殊字数)中任意3类"});
</code>

jquery正则校验 regexValidator这么写对吗,为什么正则表达式,校验不符合预期

注意你的代码

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn