You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Loop through inner native form controls to adapt their validityState. [NL]
372
-
this.#formCtrlElements.forEach(formCtrlEl=>{
373
-
letkey: keyofValidityState;
374
-
for(keyinformCtrlEl.validity){
375
-
if(key!=='valid'&&formCtrlEl.validity[key]){
376
-
this.#validity[key]=true;
377
-
messages.add(formCtrlEl.validationMessage);
378
-
innerFormControlEl??=formCtrlEl;
379
-
}
380
-
}
381
-
});
382
-
383
391
// Loop through custom validators, currently its intentional to have them overwritten native validity. but might need to be reconsidered (This current way enables to overwrite with custom messages) [NL]
384
-
this.#validators.forEach(validator=>{
392
+
this.#validators.some(validator=>{
385
393
if(validator.checkMethod()){
386
394
this.#validity[validator.flagKey]=true;
387
-
messages.add(validator.getMessageMethod());
395
+
//messages.add(validator.getMessageMethod());
396
+
message=validator.getMessageMethod();
397
+
returntrue;
388
398
}
399
+
returnfalse;
389
400
});
390
401
402
+
if(!message){
403
+
// Loop through inner native form controls to adapt their validityState. [NL]
0 commit comments