Skip to content

WEB-914 Validation error message not displayed for required Note fiel…#3491

Merged
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-914-validation-error-message-not-displayed-for-required-note-field-in-undo-disbursal-in-loan-account-details
Apr 17, 2026
Merged

WEB-914 Validation error message not displayed for required Note fiel…#3491
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-914-validation-error-message-not-displayed-for-required-note-field-in-undo-disbursal-in-loan-account-details

Conversation

@JaySoni1
Copy link
Copy Markdown
Contributor

@JaySoni1 JaySoni1 commented Apr 9, 2026

Changes Made :-

-Add validation error message display to the Undo Disbursal form's Note field.

WEB-914

Before :-
image

After :-
image

Summary by CodeRabbit

  • Bug Fixes
    • Improved form validation with error messages now displayed for required fields when left empty, providing clearer user feedback during form submission.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 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

The pull request adds conditional error rendering to an Angular template, displaying a required field validation error message for the note form control using Material's error component when validation fails.

Changes

Cohort / File(s) Summary
Undo Disbursal Template Error Handling
src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html
Added conditional <mat-error> element that displays when the note form control fails required validation, providing user-facing feedback for missing input.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • IOhacker
🚥 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 clearly references the specific issue (WEB-914) and describes the main change: adding a validation error message display for the required Note field in the Undo Disbursal form.
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

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
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html`:
- Around line 16-21: The submit path allows empty notes because the submit
button isn't disabled when the FormControl note is invalid and the component's
submit() lacks a guard; update the template's submit button to include
[disabled]="!note.valid" and update the UndoDisbursalComponent.submit() method
to check if (!note.valid) return early (or markAsTouched/markAllAsTouched and
return) before calling the API, using the existing FormControl named note to
enforce the same validation pattern as other loan action components.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e2f193e9-5af4-422a-a6ef-b6fe26aed398

📥 Commits

Reviewing files that changed from the base of the PR and between 62acfd6 and 82a2927.

📒 Files selected for processing (1)
  • src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html

Copy link
Copy Markdown
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 b93c604 into openMF:dev Apr 17, 2026
6 checks passed
@JaySoni1
Copy link
Copy Markdown
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