feat(forms): consistent help/error spacing + persistent inline server errors #265

Merged
vas2000-work merged 1 commit from feat/MAPPS-265-form-help-error-spacing-inline-validation into main 2026-06-17 23:54:55 +02:00
Owner

Normalize the help/error slot in the shared form controls (Input/Textarea/Select/Checkbox) so spacing and line-height match: every help/error paragraph now uses text-sm leading-5, and the Checkbox renders its help/error below the label with the same mt-1 spacing and gains an optional error prop so it lines up with the other controls.

Wire the server-side errors[] envelope back onto each field. On a failed submit the create/edit forms for companies, contacts, projects, and contracts now route every 422 field error from ApiError::field_errors() onto its own inline error prop, so the offending field keeps a persistent inline cue across re-render instead of only a banner/toast. Errors with no matching field, or a non-422 failure, still fall back to the top-of-form banner. The contact and project forms switch from the String-error helpers to the *_typed helpers so they carry the field-level envelope.

#MAPPS-265

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Normalize the help/error slot in the shared form controls (Input/Textarea/Select/Checkbox) so spacing and line-height match: every help/error paragraph now uses text-sm leading-5, and the Checkbox renders its help/error below the label with the same mt-1 spacing and gains an optional error prop so it lines up with the other controls. Wire the server-side errors[] envelope back onto each field. On a failed submit the create/edit forms for companies, contacts, projects, and contracts now route every 422 field error from ApiError::field_errors() onto its own inline error prop, so the offending field keeps a persistent inline cue across re-render instead of only a banner/toast. Errors with no matching field, or a non-422 failure, still fall back to the top-of-form banner. The contact and project forms switch from the String-error helpers to the *_typed helpers so they carry the field-level envelope. #MAPPS-265 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(forms): consistent help/error spacing + persistent inline server errors
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m26s
Create release / Create release from merged PR (pull_request) Has been skipped
09fd5ad9a9
Normalize the help/error slot in the shared form controls (Input/Textarea/Select/Checkbox) so spacing and line-height match: every help/error paragraph now uses text-sm leading-5, and the Checkbox renders its help/error below the label with the same mt-1 spacing and gains an optional error prop so it lines up with the other controls.

Wire the server-side errors[] envelope back onto each field. On a failed submit the create/edit forms for companies, contacts, projects, and contracts now route every 422 field error from ApiError::field_errors() onto its own inline error prop, so the offending field keeps a persistent inline cue across re-render instead of only a banner/toast. Errors with no matching field, or a non-422 failure, still fall back to the top-of-form banner. The contact and project forms switch from the String-error helpers to the *_typed helpers so they carry the field-level envelope.

#MAPPS-265

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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!265
No description provided.