Skip to content

LG-5225 validation error IAL2 #6190

Merged
nprimak merged 6 commits intomainfrom
LG-5225-validation-error-IAL2-phone
Apr 14, 2022
Merged

LG-5225 validation error IAL2 #6190
nprimak merged 6 commits intomainfrom
LG-5225-validation-error-IAL2-phone

Conversation

@nprimak
Copy link
Contributor

@nprimak nprimak commented Apr 12, 2022

LG-5225 Validation Errors not shown in IAL2

Why:

  • A good bug PR to get my hands dirty as a new dev on team ada
  • Possible edge cases (disabling JS?) where this bug might still occur, but adding this line of code doesn't do any harm

How:

  • Adding a flash[:error] in rails in the phone controller create function

Testing Instructions

  1. Go to http://localhost:3000/verify
  2. Create account, follow steps until you get to verify phone
  3. In the developer tools DOM, edit <form> and add novalidate
  4. Add a phone number that is not US (ie: 3065551234)
  5. You should see the error as it appears in the screenshot below

Screenshot

Screen Shot 2022-04-12 at 2 38 43 PM

@nprimak nprimak requested review from aduth and peggles2 April 12, 2022 18:47
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

Optional depending if you're feeling up to it, but would be good to have some test coverage here as well, to make sure that the flash is set when the form is invalid.

describe '#create' do
context 'when form is invalid' do

Nadya Primak and others added 3 commits April 12, 2022 16:05
changelog: Bug Fixes, Identity Proofing, Fixed missing error message for invalid phone step submission- like non US number
@nprimak nprimak force-pushed the LG-5225-validation-error-IAL2-phone branch from 35f97e9 to 2097630 Compare April 12, 2022 20:05
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 👍 You can safely disregard the GitLab build failure.

nprimak and others added 2 commits April 13, 2022 11:32
specify exact error message we are expecting (us country code)

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

👍

@nprimak nprimak merged commit 8aa2e98 into main Apr 14, 2022
@nprimak nprimak deleted the LG-5225-validation-error-IAL2-phone branch April 14, 2022 15:17
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.

2 participants