【发布时间】:2017-10-15 08:19:48
【问题描述】:
我正在使用 bootstrapValidator(相同)检查两封电子邮件是否相同,它工作正常,但我希望在同一行中显示错误消息,现在它们在两行中。见这里https://screenshots.firefox.com/abfJ97LEjpAncVoW/localhost。我尝试了很多方法并在谷歌中找到但没有得到任何解决方案。以下是我的验证码:
$('#formid').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-alert',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
firstmail: {
validators: {
notEmpty: {
message: 'The email address is required and can\'t be empty'
},
emailAddress: {
message: 'The input is not a valid email address'
},
identical: {
field: '2ndmail',
message: 'The email and its confirm are not the same'
}
}
},
2ndmail: {
validators: {
notEmpty: {
message: 'The email address is required and can\'t be empty'
},
emailAddress: {
message: 'The input is not a valid email address'
},
identical: {
field: 'firstmail',
message: 'The email and its confirm are not the same'
}
}
},
},
})
【问题讨论】: