LG-16389 MRZ validation only performed if passport is requested and submitted#12316
LG-16389 MRZ validation only performed if passport is requested and submitted#12316
Conversation
changelog: Internal, Doc Auth, ensure MRZ validation only occurs when passport is requested and submitted
Mawar2
left a comment
There was a problem hiding this comment.
LGTM!
Minor note for future consideration -- we could add test coverage for edge cases (passport submitted when not requested, passport requested but not submitted), but not blocking.
| end | ||
|
|
||
| def passport_requested? | ||
| document_capture_session&.passport_requested? |
There was a problem hiding this comment.
| document_capture_session&.passport_requested? | |
| !!document_capture_session&.passport_requested? |
Adding on to @Mawar2 suggestion , can we add specs to ensure do not perform MRZ validation for these scenarios? |
Added a test for passport submitted when not requested. There is already a test for passport requested, but not submitted https://github.com/18F/identity-idp/blob/main/spec/forms/idv/api_image_upload_form_spec.rb#L1001 |
…9-mrz-validation-check
🎫 Ticket
Link to the relevant ticket:
LG-16389
🛠 Summary of changes
Ensure that DOS MRZ validation is only performed if a passport is requested at the "choose your id" step and that it only occurs if the document uploaded is a passport.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.