We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3225dbd commit cc1e043Copy full SHA for cc1e043
src/pat/validation/validation.js
@@ -338,12 +338,6 @@ class Pattern extends BasePattern {
338
})
339
}
340
341
-
342
- if (!validity_state.customError) {
343
- // No error to handle. Return.
344
- this.remove_error({ input });
345
- return;
346
- }
347
} else {
348
// Default error cases with custom messages.
349
@@ -405,6 +399,12 @@ class Pattern extends BasePattern {
405
399
406
400
407
401
402
+ if (validity_state.valid) {
403
+ // No error to handle. Remove eventual error and return.
404
+ this.remove_error({ input });
+ return;
+ }
+
408
if (event?.type === "submit") {
409
// Do not submit in error case and prevent other handlers to take action.
410
event.preventDefault();
0 commit comments