Conversation
changelog: Internal, Doc Auth, Update doc auth PII validation for state id and passports
| pii_like_keypaths: self.class.pii_like_keypaths, | ||
| pii_like_keypaths: self.class.pii_like_keypaths(document_type: state_id_type), | ||
| attention_with_barcode: attention_with_barcode?, | ||
| id_issued_status: pii_from_doc[:state_id_issued].present? ? 'present' : 'missing', |
There was a problem hiding this comment.
I'm thinking would we want something like "N/A" here if we are checking passports rather than state id?
|
|
||
| PII_ERROR_KEYS = %i[name dob address1 state zipcode jurisdiction state_id_number | ||
| dob_min_age].freeze | ||
| STATE_ID_TYPES = ['drivers_license', 'state_id_card', 'identification_card'].freeze |
There was a problem hiding this comment.
It was in a test suite causing this to fail. I see it may have been taken out on the latest branch so I will remove it.
|
|
||
| validate :passport_expired? | ||
|
|
||
| attr_reader :birth_place, :passport_expiration, :passport_issued, :state_id_type, |
There was a problem hiding this comment.
seems like we should move away from this state_id_type naming ... created a ticket LG-16007
app/forms/idv/doc_pii_form.rb
Outdated
| end | ||
|
|
||
| def self.pii_like_keypaths | ||
| def self.pii_like_keypaths(document_type: nil) |
There was a problem hiding this comment.
looks like we're always passing a value, should we remove the optional?
| def self.pii_like_keypaths(document_type: nil) | |
| def self.pii_like_keypaths(document_type:) |
|
|
||
| PII_ERROR_KEYS = %i[name dob address1 state zipcode jurisdiction state_id_number | ||
| dob_min_age].freeze | ||
| STATE_ID_TYPES = ['drivers_license', 'state_id_card', 'identification_card'].freeze |
There was a problem hiding this comment.
i see you had to add identificatIon_card because it looks like we're processing the id type differently across vendors 😬
👀 LG-16008
app/forms/idv/doc_pii_passport.rb
Outdated
|
|
||
| validates :birth_place, | ||
| :passport_issued, | ||
| :issuing_country_code, |
There was a problem hiding this comment.
i think we should validate this issuing_country_code is a valid territory ieUSA
🎫 Ticket
Link to the relevant ticket:
LG-15437
🛠 Summary of changes
We are updating our PII validation to now include validation for Passport PII. Here we have separated State ID validations and Passport validations into their own sub classes.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.