Skip to content

WEB-707 Allowing Negative Values in Loan Product Numeric Fields#3398

Open
JaySoni1 wants to merge 1 commit intoopenMF:devfrom
JaySoni1:WEB-707-allowing-negative-values-in-loan-product-numeric-fields
Open

WEB-707 Allowing Negative Values in Loan Product Numeric Fields#3398
JaySoni1 wants to merge 1 commit intoopenMF:devfrom
JaySoni1:WEB-707-allowing-negative-values-in-loan-product-numeric-fields

Conversation

@JaySoni1
Copy link
Contributor

@JaySoni1 JaySoni1 commented Mar 17, 2026

Changes Made :-

-Prevent negative values in loan product numeric input fields .

WEB-707

Before :-

image image image

After :-

image image image

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enforced non-negative value validation on numeric input fields across loan account and product configuration forms, preventing invalid entries for outstanding loan balances, tranche counts, installment gaps, and guarantee fund amounts.

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f46678d7-517d-4641-90bc-ccca68baab10

📥 Commits

Reviewing files that changed from the base of the PR and between 767c928 and 23e4f43.

📒 Files selected for processing (4)
  • src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html
  • src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts
  • src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html
  • src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts

Walkthrough

Adds non-negativity validation constraints to numeric loan form fields across two components. Introduces min="0" HTML attributes and Validators.min(0) validators to ensure loan amounts, tranches, gaps, guarantees, and balances cannot be negative.

Changes

Cohort / File(s) Summary
Loans Account Terms Step Component
src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html, loans-account-terms-step.component.ts
Added min="0" constraint to maxOutstandingLoanBalance input field and Validators.min(0) validator to form control in both required and optional branches.
Loan Product Settings Step Component
src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html, loan-product-settings-step.component.ts
Added min="0" attributes to multiple inputs and Validators.min(0) validators to corresponding form controls for maxTrancheCount, outstandingLoanBalance, minimumGap, maximumGap, mandatoryGuarantee, minimumGuaranteeFromOwnFunds, and minimumGuaranteeFromGuarantor.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • IOhacker
  • alberto-art3ch
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title states 'Allowing Negative Values' but the changes actually prevent negative values by adding min="0" validators. Update the title to reflect the actual change, such as 'WEB-707 Prevent negative values in loan product numeric fields' to accurately represent the implementation.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator

@alberto-art3ch alberto-art3ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wait to release the updated Loan Account views

@JaySoni1
Copy link
Contributor Author

@alberto-art3ch Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants