fix: Charges min and max gap validations and labels

This commit is contained in:
Jose Alberto Hernandez
2025-05-14 22:52:07 -05:00
parent eba99dcdc8
commit 2652574e44
6 changed files with 5380 additions and 2824 deletions
@@ -203,7 +203,7 @@
<input matInput autofocus formControlName="minCap" mifosxValidateOnFocus />
<mat-error *ngIf="chargeForm.controls.minCap.hasError('maxValue')">
{{ 'errors.validation.msg.loanproduct.maximumGap.not.greater.than.specified.number' | translate }} ({{
chargeForm.controls.maxCap.value
chargeForm.controls.minCap.value
}})
</mat-error>
</mat-form-field>
@@ -115,7 +115,7 @@
<input matInput autofocus formControlName="minCap" mifosxValidateOnFocus />
<mat-error *ngIf="chargeForm.controls.minCap.hasError('maxValue')">
{{ 'errors.validation.msg.loanproduct.maximumGap.not.greater.than.specified.number' | translate }} ({{
chargeForm.controls.maxCap.value
chargeForm.controls.minCap.value
}})
</mat-error>
</mat-form-field>
@@ -8,6 +8,9 @@ export function maxNumberValueValidator(maxControlName: string): ValidatorFn {
}
let maxValue = maxControl.value;
if (maxValue == null) {
return null;
}
if (typeof maxValue === 'undefined') {
return null;
}