tailjng 0.0.35 → 0.0.36

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.
@@ -18,7 +18,7 @@ Purpose:
18
18
 
19
19
  Usage:
20
20
  To access full functionality, simply import the necessary modules and use the
21
- components according to your use case. Be sure to review the official documentation for detailed examples
21
+ components according to your use case. Be sure to review the official documentation for detailed examples
22
22
  on implementation and customization.
23
23
 
24
24
  Authors:
@@ -27,7 +27,7 @@ Authors:
27
27
  License:
28
28
  This project is licensed under the BSD 3-Clause - see the LICENSE file for more details.
29
29
 
30
- Version: 0.0.35
30
+ Version: 0.0.36
31
31
  Creation Date: 2025-01-04
32
32
  ===============================================`
33
33
 
@@ -282,6 +282,21 @@ class JFormShared {
282
282
  const adjustedDate = new Date(d.getTime() + d.getTimezoneOffset() * 60000);
283
283
  return adjustedDate.toISOString().split('T')[0];
284
284
  }
285
+ /**
286
+ * Get invalid controls in the form group
287
+ * @returns
288
+ */
289
+ getInvalidControls(formGroup) {
290
+ const invalidControls = [];
291
+ Object.keys(formGroup.controls).forEach((controlName) => {
292
+ const control = formGroup.get(controlName);
293
+ if (control && control.invalid && control.touched) {
294
+ invalidControls.push(controlName);
295
+ console.error(`${controlName} es inválido. Errores:`, control.errors);
296
+ }
297
+ });
298
+ return invalidControls;
299
+ }
285
300
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: JFormShared, deps: [{ token: JAlertToastService }], target: i0.ɵɵFactoryTarget.Injectable });
286
301
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: JFormShared, providedIn: 'root' });
287
302
  }