Skip to content

Conversation

@jenny-heath
Copy link
Collaborator

  • turns out we were using the wrong validation from the library (phone: true will return false if the phone number doesn't have a country code)
  • decided to continue saving numbers sans country code and am now using a country specifier in the validator

select "1940", from: "Year"
fill_in I18n.t("views.personal_information.edit.phone_number_label"), with: "555-222-3333"
fill_in I18n.t("views.personal_information.edit.phone_number_label"), with: "415-816-1286"
click_on I18n.t("general.continue")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change the number here? why did the first one work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately i couldn't actually find anything in the phonelib documentation about it, so i assumed that this worked because phone numbers starting with 555 are fake and therefore treated differently? or at least not treated the same as US numbers. the being-fake part is why i tend to use them for tests but then as you found, it wasn't accepting real phone numbers because the validation i was using expected there to be a country code. the number i've used here is cfa's office number which i feel fine about using in a test. lmk if you have concerns about this though!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, that makes sense. thank you for explaining this to me!

@jenny-heath jenny-heath merged commit 3e92c31 into main Jan 9, 2026
3 checks passed
@jenny-heath jenny-heath deleted the WRSAT-245-bug-phone-number-field-on-personal-info-screen-doesnt-accept-valid-phone-numbers branch January 9, 2026 21:59
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.

3 participants