File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,11 @@ class Pattern extends BasePattern {
104
104
}
105
105
}
106
106
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
+ } ) {
108
112
if ( input . disabled ) {
109
113
// No need to check disabled inputs.
110
114
return ;
@@ -413,11 +417,10 @@ class Pattern extends BasePattern {
413
417
}
414
418
}
415
419
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.
421
424
if ( did_disable ) {
422
425
logger . debug ( "Checking whole form after element was disabled." ) ;
423
426
for ( const _input of this . inputs . filter ( ( it ) => it !== input ) ) {
You can’t perform that action at this time.
0 commit comments