Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require US state during account signup and on update #58697

Merged
merged 5 commits into from
May 16, 2024

Conversation

juanmanzojr
Copy link
Contributor

@juanmanzojr juanmanzojr commented May 16, 2024

Changes validation for the us_state in the user model to happen on create and on update.

We were allowing students to sign up without providing a us_state due to the changes made in this PR.
Students were allowed to continue without a US state as the validation was only happening when the us_state was present on an on create or on update.

This PR also adds the country_code field to the State modal in order to make sure this field is also being set for validation purposes.

After using State modal to set state

Screenshot 2024-05-16 at 2 23 52 PM

Finish Sign up if us_state missing

Screenshot 2024-05-20 at 2 40 26 PM

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@juanmanzojr juanmanzojr changed the title Add country code to state update Change US State validation to happen on change and on update May 16, 2024
@juanmanzojr juanmanzojr marked this pull request as ready for review May 16, 2024 21:35
@juanmanzojr juanmanzojr marked this pull request as draft May 16, 2024 21:35
@juanmanzojr juanmanzojr marked this pull request as ready for review May 16, 2024 21:35
@juanmanzojr juanmanzojr marked this pull request as draft May 16, 2024 21:36
@juanmanzojr juanmanzojr marked this pull request as ready for review May 16, 2024 21:36
@juanmanzojr juanmanzojr marked this pull request as draft May 16, 2024 21:37
@juanmanzojr juanmanzojr marked this pull request as ready for review May 16, 2024 21:37
@juanmanzojr juanmanzojr marked this pull request as draft May 16, 2024 21:37
@juanmanzojr juanmanzojr marked this pull request as ready for review May 16, 2024 21:37
@juanmanzojr juanmanzojr marked this pull request as draft May 16, 2024 21:37
@juanmanzojr juanmanzojr marked this pull request as ready for review May 16, 2024 21:37
@juanmanzojr juanmanzojr requested a review from a team May 16, 2024 21:37
@juanmanzojr juanmanzojr changed the title Change US State validation to happen on change and on update Require US state during account signup and on update May 16, 2024
@juanmanzojr juanmanzojr merged commit 2028cd0 into staging May 16, 2024
1 of 2 checks passed
@juanmanzojr juanmanzojr deleted the add-country-code-to-state-update branch May 16, 2024 23:46
juanmanzojr added a commit that referenced this pull request May 16, 2024
juanmanzojr added a commit that referenced this pull request May 17, 2024
juanmanzojr added a commit that referenced this pull request May 17, 2024
* Add us_state validation back and adding unit tests

* WIP

* Tests for country code inclusion in state modal

* Add country code field patch params to test country persists

---------

Co-authored-by: Dayne <dayne@code.org>
juanmanzojr added a commit that referenced this pull request May 22, 2024
* Add us_state validation back and adding unit tests

* WIP

* Tests for country code inclusion in state modal

* Add country code field patch params to test country persists

* Add check if change will happen to us_state in validation

* us_state new value validation

* Comment for clarity

* Require US state during account signup and on update (#58697)

* Add us_state validation back and adding unit tests

* WIP

* Tests for country code inclusion in state modal

* Add country code field patch params to test country persists

---------

Co-authored-by: Dayne <dayne@code.org>

* Comment for clarity

* Comment for test clarity

* Update state validation for robustness

* Add test coverage for us_state validation

* Change username to name in test us_state validation

---------

Co-authored-by: Dayne <dayne@code.org>
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.

None yet

3 participants