Skip to content

Commit 9284da6

Browse files
AchoArnoldCopilot
andcommitted
docs(web): define contact phone input
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent afb5823 commit 9284da6

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contact Phone Input Design
2+
3+
## Goal
4+
5+
Use the existing `v-phone-input` component for phone numbers in the contact
6+
add/edit dialog.
7+
8+
## Design
9+
10+
Represent each form phone row with a phone number value and its own country.
11+
Bind those fields to `v-phone-input` using `v-model` and `v-model:country`,
12+
following the messages page configuration.
13+
14+
Existing E.164 phone numbers derive their country with `libphonenumber-js`.
15+
Numbers without a detectable country and newly added rows default to `US`.
16+
Removing a row removes both its number and country because they are stored in
17+
one object.
18+
19+
## Behavior
20+
21+
- Keep support for multiple phone numbers.
22+
- Preserve current required-phone validation and server error display.
23+
- Submit only trimmed, non-empty phone number values to the API.
24+
- Keep add, edit, and remove behavior unchanged apart from the country-aware
25+
input.
26+
27+
## Validation
28+
29+
Run ESLint, Stylelint, and Prettier against the changed contact page.

0 commit comments

Comments
 (0)