fix(contacts): client-side inline validation for contact/company/site forms [MAPPS-177] #157
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-177-contact-form-validation"
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
Client-side counterpart to PMS-325: the contact, company, and site forms now validate phone, time zone, country, and postal code inline before submit, showing a per-field message instead of relying on a server error (MAPPS-177).
Changes
validate_phone_field(normalize + E.164),validate_country_field(ISO 3166-1 alpha-2),validate_postal_field(permissive),validate_timezone_field(light IANA-shape check that catches theAmerica/New Yorkmistake).Input { error }prop in the company form (phone, postal, country), the site modal (phone, time zone, postal, country), and the contact form (phone, mobile). Each form validates before submit and sends the normalized values.Manual UX pass
This issue also calls for a manual walkthrough of every contact/company field (per Yousif's note that automation misses UX/logic gaps). That is a human, in-browser step and is NOT covered by this PR; tracking it as a remaining checklist item on the issue.
Verification
cargo test --lib validation_testsgreen;cargo clippy --all-targets -- -D warnings,cargo fmt --all --check,cargo check --target wasm32-unknown-unknownclean.Server-side validation (the 422 source) is PMS-325 (linked).
#MAPPS-177