fix(assets): field-level validation on the New Asset form #222

Merged
nrupard merged 1 commit from fix/mapps-216-new-asset-form-field-validation into main 2026-06-16 16:44:04 +02:00
Owner

Replace the single shared error banner used for client validation on the New Asset form with per-field error state. Empty required Type and Company are now flagged on their own fields (highlighted, message under the field) instead of as a generic top banner; the banner is reserved for server/submit-time errors. All fields are validated and their errors collected before returning, so the form no longer aborts on the first failure.

Name, Serial Number, Manufacturer, and Model gain maxlength (and matching inline length checks) via documented caps assumed to mirror the server's asset columns. Script-y Serial/Name already render inert on the asset detail page because Dioxus escapes text nodes by default.

Add unit tests covering the new asset validators.

#MAPPS-216

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Replace the single shared `error` banner used for client validation on the New Asset form with per-field error state. Empty required Type and Company are now flagged on their own fields (highlighted, message under the field) instead of as a generic top banner; the banner is reserved for server/submit-time errors. All fields are validated and their errors collected before returning, so the form no longer aborts on the first failure. Name, Serial Number, Manufacturer, and Model gain `maxlength` (and matching inline length checks) via documented caps assumed to mirror the server's asset columns. Script-y Serial/Name already render inert on the asset detail page because Dioxus escapes text nodes by default. Add unit tests covering the new asset validators. #MAPPS-216 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(assets): field-level validation on the New Asset form
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m8s
Create release / Create release from merged PR (pull_request) Has been skipped
0ea7c78c67
Replace the single shared `error` banner used for client validation on the New Asset form with per-field error state. Empty required Type and Company are now flagged on their own fields (highlighted, message under the field) instead of as a generic top banner; the banner is reserved for server/submit-time errors. All fields are validated and their errors collected before returning, so the form no longer aborts on the first failure.

Name, Serial Number, Manufacturer, and Model gain `maxlength` (and matching inline length checks) via documented caps assumed to mirror the server's asset columns. Script-y Serial/Name already render inert on the asset detail page because Dioxus escapes text nodes by default.

Add unit tests covering the new asset validators.

#MAPPS-216

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nrupard deleted branch fix/mapps-216-new-asset-form-field-validation 2026-06-16 16:44:04 +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!222
No description provided.