【发布时间】:2020-03-02 15:24:47
【问题描述】:
我有一个 bootbox 确认对话框。在那,我有一些表单验证。验证工作正常,只要验证失败,确认对话框仍然打开。但是当我点击取消按钮时,它仍然要求验证。
bootbox.confirm({
closeButton: true,
message: valid_result,
size: 'large',
title: 'Fill fields with related values',
buttons : {
confirm : { label: '<i class="fa fa-check"></i> Validate'}
},
callback: function () {
var res = getLinkupInformation(ids_string)
if(res == true) {
return true;
} else {
return false;
}
}
});
验证部分正在工作,如果验证通过,则只有模式正在关闭。但是当用户点击取消按钮或关闭图标时,它仍然在询问验证。 When I remove return false in call back function in else part 然后是 validation button is not working 和 I click on the validate button confirmation dialog box was closing。
请指导我如何解决这个问题?
【问题讨论】:
标签: bootbox