Recently has been doing mutual gold platform, to do the background to submit the form when the validation submission data has not been submitted the issue. So Baidu a bit. This is due to a version problem. Fortunately, we found the problem. I have been modelled on the East Tin original platform, but the use of Byond background framework, may be different version, so caused
submitHandler:
function
(validator, form, submitButton) {
// 版本号0.4.5支持
// 版本号v0.5.2-dev不再支持submitHandler配置
}
This method is always invalid and cannot be executed. Baidu Search is the following solution. debugging can be used.A syntax error occurred at the beginning of the debugging because I
. On ("Success.form.bv", function (e) {
Version number 0.4.5 support
Version number V0.5.2-dev support
Alert (11);
}); This method is written in the $ (' form '). Bootstrapvalidator ({}), so the syntax error has been reported. Look carefully, actually this. The on () method is followed by $ (' form '). Bootstrapvalidator ({}) after this.
This article mainly introduces the bootstrap Validator version difference problem caused by the Submithandler failure problem resolution, the following through this article to give you a detailed explanation, the need for friends can refer to the next
The two versions I've used:
v0.5.2-dev,0.4.5
Here is a description of the submission method, the following code:
?
123456789101112 |
<SCRIPT> $ ( function () { $ ( "#addUserForm" Code class= "JS Plain"). Bootstrapvalidator ({ submithandler: function (validator, form, Submitbutton) { //version number 0.4.5 support //version number V0.5.2-dev no longer supports Submithandler configuration } "SUCCESS.FORM.BV" , function (e) { // Version number 0.4.5 support //version number V0.5.2-dev support }); </SCRIPT> |
The above is a small series to introduce you to the bootstrap Validator version differences caused by the problem of submithandler solution, I hope that we have some help, if you have any questions please give me a message, small series will promptly reply to you. Thank you very much for the support of the Scripting House website!
BootStrap solution to Submithandler failure problem caused by Validator version difference problem