Skip to content

Commit e262ea4

Browse files
committed
fix(#148): form can't be submit after validation failed
1 parent 47f92b7 commit e262ea4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

webiojs/src/handlers/input.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,13 @@ class FormController {
220220

221221
element.find('button').prop("disabled", true);
222222

223-
for (let name in that.name2input)
224-
if (!that.name2input[name].check_valid())
223+
for (let name in that.name2input){
224+
if (!that.name2input[name].check_valid()){
225+
element.find('button').prop("disabled", false);
225226
return error_alert(t("error_in_input"));
227+
}
228+
}
229+
226230

227231
let data_keys: string[] = [];
228232
let data_values: any[] = [];

0 commit comments

Comments
 (0)