fix(forms): reject whitespace-only required fields client-side (MAPPS-281) #289
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!289
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-281-whitespace-required-trim"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Contact form's
first_name/last_nameand the New Ticket form'stitlecarried HTML5required, which accepts any non-empty string - including " ". A whitespace-only submit passed the browser check, reached the server, and surfaced a raw 422 banner with no field-level error. Trim the value at submit time and set the inline field error instead so the user sees which field failed at the source. The Company form already trims viavalidate_name_field, so no change needed there. Other forms have not been migrated yet (audit follow-up tracked under MAPPS-282 / MAPPS-284 since the failure mode overlaps).#MAPPS-281