LG-10422 Validate Address1 Field from Document (DocAuth/IdV)#9002
Merged
LG-10422 Validate Address1 Field from Document (DocAuth/IdV)#9002
Conversation
Co-authored-by: Brittany Greaner <35475380+night-jellyfish@users.noreply.github.com>
dawei-nava
reviewed
Aug 16, 2023
aduth
reviewed
Aug 16, 2023
Contributor
I was able to test it with a yml file that contained the below information. document:
type: license
first_name: Susan
last_name: Smith
middle_name: Q
address1: ""
address2: Apt 3
city: Bayside
state: NY
zipcode: "11225"
dob: 10/06/1938
phone: +1 314-555-1212
state_id_number: "123456789"
state_id_type: drivers_license
state_id_jurisdiction: "NY"The visual result matched what I expected. (Caveat, I am not a designer!) I agree that it would be good to try using ActiveRecord validation helpers. |
charleyf
commented
Aug 18, 2023
| context 'but doc_pii validation fails' do | ||
| let(:first_name) { 'FAKEY' } | ||
| let(:last_name) { 'MCFAKERSON' } | ||
| let(:address1) {'123 Houston Ave'} |
Contributor
Author
There was a problem hiding this comment.
@matthinz Requesting your review specifically because I'd like extra eyes on these changes in spec/controllers/idv/image_uploads_controller_spec.rb. Do these look reasonable to you?
…ess is not read off of the id, tell the user about that problem earlier so they can re-upload id to fix
eileen-nava
reviewed
Aug 21, 2023
eileen-nava
approved these changes
Aug 21, 2023
Contributor
eileen-nava
left a comment
There was a problem hiding this comment.
LGTM, but I'd still like to get some eyes on this from Team Ada.
dawei-nava
approved these changes
Aug 23, 2023
2 tasks
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🎫 Ticket
Link to the relevant ticket.
https://cm-jira.usa.gov/browse/LG-10422
🛠 Summary of changes
This PR changes it so that if an address is not read from the document correctly we show an error immediately instead of allowing them to continue to the next step. This should help folks fix these errors and succeed in the verification process.
📜 Testing Plan
First, create two yaml files
Save this as "missing-address.yml"
Save this as "has-no-errors.yml"
Second, navigate to the DocAuth Flow, Upload page
Log in to login.gov on your local instance, navigate to the doc auth flow by adding
/verifyto the end of your URL, then click through until you see the page that lets you upload the "FRONT" and "BACK" of your ID.Third, test the errors
mainbranch (without these changes) verify that uploading themissing-address.ymlfile as both the front/back of the ID causes no errors in the document upload step.missing-address.ymlas both the front/back of the ID causes an error. See below for a screenshot of the error we expect.missing-address.ymlandhas-no-errors.ymlto make sure they behave as expected. If either the front/back has a missing address we'd expect a failure, but if both arehas-no-errors.ymlwe expect the document upload to succeed.