bootstrapvalidator 验证两次密码是不是输入一致

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了bootstrapvalidator 验证两次密码是不是输入一致相关的知识,希望对你有一定的参考价值。

参考技术A newPwd:
validators:
notEmpty:
message: '*新密码不能为空'


,
checkPwd:
validators:
notEmpty:
message: '*确认密码不能为空'
,
identical:
field: 'newPwd',
message: '*两次输入密码不一致'


参考技术B

    用js获取第一个输入框的值,

    再获取第二值

    判断第二值是否等于第一个值,是的话就是一致,不是的话,提示请重新输入

参考技术C 正常情况下是正常 参考技术D 输入一致必须的。 第5个回答  2016-04-18 是的,输入一致

bootstrapValidator使用总结

1.根据条件增删检查条件

参考文章:https://blog.csdn.net/sxlzs_/article/details/78211928

#去除某字段的验证

$("#formResource").bootstrapValidator(‘removeField‘, ‘permission‘);

#增加某字段的验证

$("#formResource").bootstrapValidator("addField", "permission", {
     validators : {
         notEmpty : {
             message : ‘数据标识不能为空‘
         }
     }
});







以上是关于bootstrapvalidator 验证两次密码是不是输入一致的主要内容,如果未能解决你的问题,请参考以下文章

BootstrapValidator - 禁用给定字段的特定验证

[bootstrapValidator] - bootstrap的验证工具

bootstrapValidator 获得表单验证的返回值

输入类型文件无法使用 bootstrapvalidator 进行验证

如何停止 bootstrapValidator 来验证隐藏的输入字段?

使用bootstrapvalidator的remote验证经验