@esfaenza/forms-and-validations 15.2.18 → 15.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -578,7 +578,7 @@ class ValidationSelectComponent extends BaseValidation {
578
578
  //controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
579
579
  //Lo imposto ANCHE se sono in situazione di noValidate perché comporta eventuali modifiche grafiche che potrebbero servirmi, ma comunque non va a d aggiungere
580
580
  //validatori o cose strane, quindi GG
581
- if (this._validators && this._validators.some(elem => elem instanceof RequiredValidator && elem.required))
581
+ if (this._validators && this._validators.some(elem => elem instanceof RequiredValidator && (elem.required === true || elem.required === null || elem.required === undefined)))
582
582
  this.required = true;
583
583
  }
584
584
  /**
@@ -2037,7 +2037,7 @@ class BaseFormControl {
2037
2037
  checkRequiredValidator() {
2038
2038
  // controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
2039
2039
  // Lo faccio qui e non in un eventuale ngOnInit o costruttore perché ngOnInit non sempre viene chiamato e da costruttore il validatore non ha ancora il valore giusto
2040
- if (this._validators && this._validators.some(elem => elem.inputName == "required" && elem.normalizeInput() == true))
2040
+ if (this._validators && this._validators.some(elem => elem.inputName == "required" && (elem.required === true || elem.required === null || elem.required === undefined)))
2041
2041
  this.Required = true;
2042
2042
  }
2043
2043
  /** @ignore */