WEB-680 Fix: Provisioning Criteria dialog allows negative values in age, percentage fields
This commit is contained in:
@@ -34,6 +34,12 @@ export class FormGroupService {
|
||||
if (formfield.required) {
|
||||
validators.push(Validators.required);
|
||||
}
|
||||
if (formfield.min !== null && formfield.min !== undefined) {
|
||||
validators.push(Validators.min(formfield.min));
|
||||
}
|
||||
if (formfield.max !== null && formfield.max !== undefined) {
|
||||
validators.push(Validators.max(formfield.max));
|
||||
}
|
||||
if (formfield.validators) {
|
||||
formfield.validators.forEach((validator: ValidatorFn) => validators.push(validator));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
matInput
|
||||
[formControlName]="formfield.controlName"
|
||||
[required]="formfield.required"
|
||||
[attr.min]="formfield.min"
|
||||
[attr.max]="formfield.max"
|
||||
/>
|
||||
}
|
||||
@if (form.controls[formfield.controlName].hasError('max')) {
|
||||
|
||||
Reference in New Issue
Block a user