File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,7 +104,11 @@ class Pattern extends BasePattern {
104104 }
105105 }
106106
107- check_input ( { input, event, stop = false } ) {
107+ check_input ( {
108+ input, // Input to check.
109+ event = null , // Optional event which triggered the check.
110+ stop = false // Stop flag to avoid infinite loops. Will not check dependent inputs.
111+ } ) {
108112 if ( input . disabled ) {
109113 // No need to check disabled inputs.
110114 return ;
@@ -413,11 +417,10 @@ class Pattern extends BasePattern {
413417 }
414418 }
415419
416- // Do an initial check of the whole form when a form element (e.g. the
417- // submit button) was disabled. We want to show the user all possible
418- // errors at once and after the submit button is disabled there is no
419- // way to check the whole form at once. ... well we also do not want to
420- // check the whole form when one input was changed....
420+ // Check the whole form when a form element (e.g. the submit button)
421+ // was disabled. We want to show the user all possible errors at once
422+ // and after the submit button is disabled there is no way for the user
423+ // to check the whole form at once.
421424 if ( did_disable ) {
422425 logger . debug ( "Checking whole form after element was disabled." ) ;
423426 for ( const _input of this . inputs . filter ( ( it ) => it !== input ) ) {
You can’t perform that action at this time.
0 commit comments