Моя проверка формы работает отлично, но функция успеха не запускается в конце.Синтаксис выглядит нормально.Но я не уверен, сможем ли мы включить функцию успеха с валидатором
Однако, предотвращение по умолчанию не останавливает его отправку.любая помощь ???
$('#editVolForm').bootstrapValidator({
// To use feedback icons, ensure that you use Bootstrap v3.1.0 or later
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
editPapSub: {
validators: {
stringLength: {
min: 1,
},
regexp: {
regexp: /^[0-9]+$/,
message: "'Submitted Papers' can only consist of numeric characters."
},
notEmpty: {
message: "A valid number of 'Papers Submmited' is required."
}
}
},
editPapAcc: {
validators: {
stringLength: {
min: 1,
},
regexp: {
regexp: /^[0-9]+$/,
message: "'Accepted Papers' can only consist of numeric characters."
},
notEmpty: {
message: "A valid number of 'Papers Accepted' is required."
}
}
}
}).on('success.form.bv', function(e) {
e.preventDefault();
console.log("test");
});