Skip to content

Require the address on register step 2 for orgs that ask for it - #4009

Merged
sethherr merged 2 commits into
mainfrom
sethherr/auckland-v5
Jul 31, 2026
Merged

Require the address on register step 2 for orgs that ask for it#4009
sethherr merged 2 commits into
mainfrom
sethherr/auckland-v5

Conversation

@sethherr

Copy link
Copy Markdown
Member

UI::Forms::AddressGroup takes required: and street_2:, and register step 2 passes required: from the organization's require_reg_address — the way it already gates student_id on require_reg_student_id.

  • Everything but street_2 gets the required attribute and a starred label.
  • Only the showing half of the state/region pair is required. The browser won't submit a form holding a hidden required field, and can't focus it to say why, so the Stimulus controller moves required across when the country changes.
  • The country and region fields now render through UI::Forms::Select / UI::Forms::Input rather than hand-rolled twinput markup.

sethherr and others added 2 commits July 31, 2026 13:39
`UI::Forms::AddressGroup` takes `required:` and `street_2:`, and step 2
passes `required:` from the organization's `require_reg_address`, the way
it already gates `student_id` on `require_reg_student_id`.

- Everything but street_2 gets the required attribute and a starred label.
- Only the showing half of the state/region pair is required — the browser
  won't submit a form holding a hidden required field, and can't focus it
  to say why — so the Stimulus controller moves `required` across when the
  country changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AddressGroup renders inside the wrapper's fragment cache, so its markup
change moves the digest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sethherr
sethherr marked this pull request as ready for review July 31, 2026 21:04
@sethherr
sethherr merged commit 48a2b9f into main Jul 31, 2026
9 checks passed
@sethherr
sethherr deleted the sethherr/auckland-v5 branch July 31, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant