feat(contacts): inline company name validation + duplicate-name feedback (MAPPS-246) #273
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/MAPPS-246-company-name-inline-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?
Adds inline client-side validation for the company create/edit form's Company Name field, mirroring the server's
validate_company_namerule (trim, reject empty/whitespace-only, reject control characters) via a newvalidate_name_fieldrun first in the submit handler so the user sees "Company name is required." inline before any request rather than bouncing off an opaque server 422. Also routes a duplicate-name 409 from the create/edit endpoint onto the Company Name field using the server's conflict message (branching onApiError::status_code(), with a message-text fallback), keeping it robust if the backend 409 is not yet deployed and leaving the existing website/phone/postal/country validation and the success/other-error paths unchanged. Extends the established per-field validator +*_errsignal pattern; covered by a new unit test.#MAPPS-246