# Sign-up form: 3 steps, 15 fields, cross-field validation

Page: `http://127.0.0.1:4391/` (serve with `python3 -I -m http.server 4391 --bind 127.0.0.1 --directory site` in ~/formlab).
Each field has an id (`fullName`, `email`, … `terms`) and its error is in `#err-<id>`. Steps are `#step-1..3`; buttons `#next`, `#back`, `#submit`. The current step's indicator `#ind-N` has `aria-current="step"`. After submit, `#done-title` and `#summary` show.

Valid data used unless a case says otherwise:
- Step 1: Full name `Sam Rivera`, Email `sam@example.com`, Confirm email `sam@example.com`, Password `Blue2026sky`, Confirm password `Blue2026sky`.
- Step 2: Date of birth `1990-05-14`, Country `United States`, State `WA`, Postal code `98101`, Phone `+12065550100`.
- Step 3: Plan `Pro`, Seats `2`, Start date `2027-01-04`, End date `2027-06-30`, terms ticked.

| # | Steps | Expected |
|---|---|---|
| TC-1 | Open the page and click Next with nothing filled in. | Still on step 1. Errors: fullName "Enter your full name.", email "Enter a valid email.", password "At least 8 characters, with a letter and a number." No error under confirmEmail or confirmPassword. |
| TC-2 | Fill step 1 with valid data but Confirm email `sam@example.org`. Click Next. | Still on step 1; confirmEmail "Emails do not match." |
| TC-3 | Valid step 1 but Password `sam12345xyz` and Confirm password the same. Click Next. | Still on step 1; password "Password must not contain your email name." |
| TC-4 | Valid step 1 but Confirm password `Blue2026sk`. Click Next. | Still on step 1; confirmPassword "Passwords do not match." |
| TC-5 | Valid step 1, click Next. | Step 2 shows, `#ind-2` is current, Back is visible. |
| TC-6 | On step 2 enter valid data but Country `United States` with no State. Click Next. | Still on step 2; state "State is required for the United States." |
| TC-7 | On step 2 pick Country `Canada`, State `WA`, Postal code `98101`, Phone `+12065550100`. Click Next. | Still on step 2; state "State applies to the United States only."; postalCode "Canadian postal codes look like A1A 1A1." |
| TC-8 | On step 2 set Country `United Kingdom`, no State, Postal code `SW1A 1AA`, Phone `2065550100`, Date of birth `2015-03-01`. Click Next. | Still on step 2; dob "You must be 18 or older."; phone "Enter the phone with its country code, like +14155550100." |
| TC-9 | Valid step 2, click Next; then click Back, then Next again. | Step 3 shows; after Back, step 2 still holds the values entered (Postal code `98101`); after Next, step 3 again. |
| TC-10 | On step 3 choose Plan `Team`, Seats `2`, valid dates, terms ticked. Click Create account. | Still on step 3; seats "Team needs at least 3 seats." |
| TC-11 | On step 3 choose Plan `Basic`, Seats `1`, Start `2027-01-04`, End `2028-02-01`, terms ticked. Click Create account. | endDate "Basic plans last up to one year." Then set End `2027-01-03`: endDate "End date must be after the start date." |
| TC-12 | On step 3, valid data but terms not ticked. Click Create account. | terms "Accept the terms to continue." |
| TC-13 | Valid data on all three steps, click Create account. | `#done-title` "Welcome, Sam Rivera!"; summary Email `sam@example.com`, Country `US / WA`, Plan `pro × 2`, Dates `2027-01-04 to 2027-06-30`. |
