monkey-front-components 0.0.718 → 0.0.719
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.
- package/esm2020/lib/components/base/base-component.mjs +6 -1
- package/esm2020/lib/components/base/base-validators.mjs +4 -1
- package/fesm2015/monkey-front-components.mjs +8 -0
- package/fesm2015/monkey-front-components.mjs.map +1 -1
- package/fesm2020/monkey-front-components.mjs +8 -0
- package/fesm2020/monkey-front-components.mjs.map +1 -1
- package/monkey-front-components-0.0.719.tgz +0 -0
- package/package.json +2 -2
- package/monkey-front-components-0.0.718.tgz +0 -0
|
@@ -120,6 +120,8 @@ class BaseComponent {
|
|
|
120
120
|
return 'INVALID-DATE-RANGE';
|
|
121
121
|
if (formControl?.hasError('differentFromZero'))
|
|
122
122
|
return 'DIFFERENT-FROMT-ZERO';
|
|
123
|
+
if (formControl?.hasError('invalidMinYears'))
|
|
124
|
+
return 'INVALID-MIN-YEARS';
|
|
123
125
|
return 'FIELD-INVALID';
|
|
124
126
|
}
|
|
125
127
|
getErrorLastMessageNotTranslated(formControl = null) {
|
|
@@ -135,6 +137,9 @@ class BaseComponent {
|
|
|
135
137
|
if (formControl?.hasError('min')) {
|
|
136
138
|
return `${formControl?.getError('min').min}`;
|
|
137
139
|
}
|
|
140
|
+
if (formControl?.hasError('invalidMinYears')) {
|
|
141
|
+
return `${formControl?.getError('invalidMinYears').year}`;
|
|
142
|
+
}
|
|
138
143
|
return '';
|
|
139
144
|
}
|
|
140
145
|
validateFormWithTranslate(f, index) {
|
|
@@ -362,6 +367,9 @@ const validators = {
|
|
|
362
367
|
documentCL: Validators.documentCL,
|
|
363
368
|
documentMX: Validators.documentMX,
|
|
364
369
|
date: Validators.date,
|
|
370
|
+
minYears: (param) => {
|
|
371
|
+
return Validators.minYears(param);
|
|
372
|
+
},
|
|
365
373
|
zipCode: Validators.zipCode,
|
|
366
374
|
minLength: (param) => {
|
|
367
375
|
return Validators$1.minLength(param);
|