WEB-914 Validation error message not displayed for required Note fiel…#3491
Conversation
…d in Undo Disbursal in Loan Account Details
|
Note
|
| 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
src/app/loans/loans-view/loan-account-actions/undo-disbursal/undo-disbursal.component.html
|
@alberto-art3ch Thank You for the review |
Changes Made :-
-Add validation error message display to the Undo Disbursal form's Note field.
WEB-914
Before :-

After :-

Summary by CodeRabbit