bootstrapValidator 表单项验证正确了但是无法提交表单?
$('#defaultForm').bootstrapValidator({
container: 'tooltip',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
firstName: {
validators: {
stringLength: {
enabled: false,
min: 4,
message: 'The first name must be more than 5 characters'
},
notEmpty: {
message: 'The first name is required'
},
regexp: {
enabled: true,
regexp: /^[a-z]+$/i,
message: 'The first name must consist of a-z, A-Z characters only'
}
}
},
lastName: {
validators: {
stringLength: {
min: 4,
message: 'The last name must be more than 5 characters'
},
notEmpty: {
message: 'The last name is required'
},
regexp: {
regexp: /^[a-z]+$/i,
message: 'The last name must consist of a-z, A-Z characters only'
}
}
}
}
});
});
验证代码如上,两项都验证正确了,但是提交到action的地方无法提交,按钮变成不可点击状态,请问是怎么回事呢?谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提交按钮不能用
name="submit"