WEB-680 Fix provisioning criteria dialog allows negative values in age percentage fields#3111
Merged
alberto-art3ch merged 1 commit intoopenMF:devfrom Feb 9, 2026
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Form validation core & template src/app/shared/form-dialog/form-group.service.ts, src/app/shared/form-dialog/formfield/formfield.component.html |
FormGroupService.buildValidators now adds Validators.min/Validators.max when formfield.min/formfield.max are defined; input elements bind [attr.min] and [attr.max]. |
Loan provisioning criteria forms src/app/organization/loan-provisioning-criteria/create-loan-provisioning-criteria/create-loan-provisioning-criteria.component.ts, src/app/organization/loan-provisioning-criteria/edit-loan-provisioning-criteria/edit-loan-provisioning-criteria.component.ts |
Introduced min: 0 for minAge, maxAge, and provisioningPercentage fields to enforce non-negative values. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- WEB-569 Negative values allowed for repayment event days in loan product creation form #2984: Adds HTML min attributes and
Validators.min(...)to numeric form controls — closely related changes. - WEB-568 Negative values allowed for arrears ageing overdue days for npa and principal threshold fields in loan product settings #2983: Applies
minattribute andValidators.minnon-negative checks for numeric inputs — similar validation pattern. - WEB-665 Reccuring deposit product form negative values allowed for deposit amount fields #3088: Introduces min-value validation and input min attributes for numeric fields — same code-level intent.
Suggested reviewers
- IOhacker
- alberto-art3ch
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately reflects the main change: adding min value validation to prevent negative values in age and percentage fields for the provisioning criteria dialog. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
…ge, percentage fields
579d0b3 to
2cb554e
Compare
Contributor
Author
|
@alberto-art3ch Thank You for the review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Made :-
-Adds min=0 validation to age/percentage fields by implementing Validators.min() in FormGroupService and HTML min attribute in formfield template.
WEB-680
Before :-
After :-
Summary by CodeRabbit