feat(tickets): migrate new-ticket form to FormGuard, enforce Description (PMS-518) #352
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-518-migrate-ticket-time-forms"
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?
What
First per-page increment of the PMS-515 form-validation migration (PMS-518). Migrates the new-ticket form (
TicketNewPage) onto the sharedFormGuard(PMS-517) and fixes the first silent gap.Changes
handle_submit->FormGuard. Each required field goes throughguard.field(id, value, label, rules)(returns the inline message, records first-invalid);guard.blocked()focuses the first invalid field and bails before the POST. Replaces the bespoke PMS-514filter(|_| !title_empty)trick.description_errorsignal, an inline error slot,Rule::Required(blur), and a guard check (submit). The enforce direction was confirmed with the product owner. The server still accepts an empty body, so this is a purely client-side rule; the trimmed (now non-empty) Description is sent.rules: vec![Rule::Required]for on-blur parity.guard.note_invalid(None).dev-docs/form-validation-audit.md: corrects the decomposition to the real issue ids and adds a per-page migration-progress checklist (new-ticket done).Behaviour
guard.fieldclears a stale message on a passing resubmit.Verification
just checkparity via the rust-builder image:clippy --all-targets -- -D warnings,fmt --check,cargo check --target wasm32-unknown-unknown- all green. (Logic lives in the already-unit-testedvalidation/form_guardmodules; this is the wiring.)