WEB-630 Days Till Field Allows Negative Values in Create Delinquency Range Form

This commit is contained in:
JaySoni1
2026-01-27 19:12:47 +05:30
parent d36e2b6cb5
commit 5fb92f2f54
2 changed files with 5 additions and 4 deletions
@@ -24,7 +24,7 @@
<mat-form-field>
<mat-label>{{ 'labels.inputs.Days From' | translate }}</mat-label>
<input matInput type="number" required formControlName="minimumAgeDays" min="1" />
<input matInput type="number" required formControlName="minimumAgeDays" min="0" />
@if (delinquencyRangeForm.controls.minimumAgeDays.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Days From' | translate }} {{ 'labels.commons.is' | translate }}
@@ -38,7 +38,7 @@
<mat-form-field>
<mat-label>{{ 'labels.inputs.Days Till' | translate }}</mat-label>
<input matInput type="number" formControlName="maximumAgeDays" />
<input matInput type="number" required formControlName="maximumAgeDays" min="1" />
</mat-form-field>
</div>
</mat-card-content>
@@ -48,14 +48,15 @@ export class CreateRangeComponent implements OnInit {
0,
[
Validators.required,
Validators.pattern('^(0*[1-9][0-9]*?)$'),
Validators.pattern('^(0|[1-9][0-9]*)$'),
Validators.max(1000)
]
],
maximumAgeDays: [
'',
[
Validators.pattern('^(0*[1-9][0-9]*?)$'),
Validators.required,
Validators.pattern('^(0*[1-9][0-9]*)$'),
Validators.max(10000)
]
]