File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,7 @@ class Pattern extends BasePattern {
5353 // On submit, check all.
5454 // Immediate, non-debounced check with submit. Otherwise submit
5555 // is not cancelable.
56- for ( const input of this . inputs ) {
57- logger . debug ( "Checking input for submit" , input , e ) ;
58- this . check_input ( { input : input , event : e } ) ;
59- }
56+ this . validate_all ( ) ;
6057 } ,
6158 // Make sure this event handler is run early, in the capturing
6259 // phase in order to be able to cancel later non-capturing submit
@@ -74,6 +71,13 @@ class Pattern extends BasePattern {
7471 this . el . setAttribute ( "novalidate" , "" ) ;
7572 }
7673
74+ validate_all ( ) {
75+ // Check all inputs.
76+ for ( const input of this . inputs ) {
77+ this . check_input ( { input : input , event : e } ) ;
78+ }
79+ } ,
80+
7781 initialize_inputs ( ) {
7882 this . inputs = [
7983 ...this . el . querySelectorAll ( "input[name], select[name], textarea[name]" ) ,
You can’t perform that action at this time.
0 commit comments