Skip to content

WEB-704 Restrict negative values for group rules minimum savings amount and share price fields#3133

Merged
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-704-restrict-negative-values-for-group-rules-minimum-savings-amount-and-share-price-fields
Feb 11, 2026
Merged

WEB-704 Restrict negative values for group rules minimum savings amount and share price fields#3133
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-704-restrict-negative-values-for-group-rules-minimum-savings-amount-and-share-price-fields

Conversation

@JaySoni1
Copy link
Contributor

@JaySoni1 JaySoni1 commented Feb 11, 2026

Changes Made :-

-Restricts "Minimum Savings Amount per Meeting" and "Price of one Share" fields in group rules form to only accept zero or positive values..

WEB-704

Before :-

image

After :-

image

Summary by CodeRabbit

  • Bug Fixes
    • Improved form validation for numeric financial fields to enforce minimum value constraints, ensuring data consistency and preventing invalid entries.

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 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

Walkthrough

Modified getFormfields function in datatables utility to add minimum value constraint for specific TEXT column types. When processing TEXT display types, the code now identifies minSavingsAmount and priceOneShare fields and applies a min: 0 validation rule to their input options.

Changes

Cohort / File(s) Summary
Form Field Constraint Enhancement
src/app/core/utils/datatables.ts
Added conditional logic to compute field identification values and apply min: 0 constraint to InputBase options for minSavingsAmount and priceOneShare TEXT column types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • IOhacker
  • alberto-art3ch
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: restricting negative values for two specific form fields in group rules.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/app/core/utils/datatables.ts (1)

47-49: Hardcoding domain-specific field names in a generic utility is a maintainability concern.

datatables.ts is a generic utility for all datatable form fields, but the minimumsavingsamountpermeeting and priceofoneshare checks are specific to Group Rules. If more fields need similar constraints in the future, this approach doesn't scale and pollutes the generic layer.

Consider instead allowing callers to pass field-level validation constraints (e.g., a Map<string, {min?: number, max?: number}>) into getFormfields, keeping this utility domain-agnostic.


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.

LGTM

@alberto-art3ch alberto-art3ch merged commit fa055a3 into openMF:dev Feb 11, 2026
5 checks passed
@JaySoni1
Copy link
Contributor Author

@alberto-art3ch Thank You for the review

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