fix(forms): collect every validation error on submit instead of one at a time (MAPPS-284) #304

Merged
YousifShkara merged 1 commit from fix/MAPPS-284-show-all-validation-errors into main 2026-06-21 10:21:18 +02:00
Owner

The Project create form was the QA report's specific reproducer: the validators ran top-to-bottom and early-returned on the first error, so a user with a negative budget AND a malformed budget-hours value had to fix Budget, resubmit, then discover the Hours error. Replace the early-return chain with an accumulate-and-report pattern: every per-field validator runs, every Err sets its inline error signal, and the submit aborts only after all checks have surfaced their findings. The user sees every offending field on the first submit.

Pattern can be repeated on Contract, Asset, Invoice, etc. - this PR captures the Project form (the documented reproducer) and the pattern is in place for follow-ups.

#MAPPS-284

The Project create form was the QA report's specific reproducer: the validators ran top-to-bottom and early-returned on the first error, so a user with a negative budget AND a malformed budget-hours value had to fix Budget, resubmit, then discover the Hours error. Replace the early-return chain with an accumulate-and-report pattern: every per-field validator runs, every Err sets its inline error signal, and the submit aborts only after all checks have surfaced their findings. The user sees every offending field on the first submit. Pattern can be repeated on Contract, Asset, Invoice, etc. - this PR captures the Project form (the documented reproducer) and the pattern is in place for follow-ups. #MAPPS-284
fix(forms): collect every validation error on submit instead of one at a time (MAPPS-284)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 3m59s
Create release / Create release from merged PR (pull_request) Has been skipped
526e5ccac9
The Project create form was the QA report's specific reproducer: the validators ran top-to-bottom and early-returned on the first error, so a user with a negative budget AND a malformed budget-hours value had to fix Budget, resubmit, then discover the Hours error. Replace the early-return chain with an accumulate-and-report pattern: every per-field validator runs, every Err sets its inline error signal, and the submit aborts only after all checks have surfaced their findings. The user sees every offending field on the first submit.

Pattern can be repeated on Contract, Asset, Invoice, etc. - this PR captures the Project form (the documented reproducer) and the pattern is in place for follow-ups.

#MAPPS-284
YousifShkara deleted branch fix/MAPPS-284-show-all-validation-errors 2026-06-21 10:21:18 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!304
No description provided.