SoFunction
Updated on 2025-02-28

Verify before form submission in EasyUI

Using EasyUi we can verify before submitting the client form. The process is as follows: just use the return $("#form1").form('validate') method when onSubmit. The from('validate') method in the form module in EasyUi will verify the required elements such as required=true in the form specified, but if there are elements that do not pass, it will return a false;

$("#form1").form({
url: '',
onSubmit: function () {
//Form Verificationreturn $("#form1").form('validate')
},
success: function (data) {
alert(data)
}
}
);

The above is the EasyUI introduced to you by the editor to verify it before the form is submitted. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!