LG-9229 add transliteration validation to additional fields on state id pg#8099
Conversation
…on validation to address input fields
spec/features/idv/in_person_spec.rb
Outdated
|
|
||
| context 'transliteration' do | ||
| let(:capture_secondary_id_enabled) { true } | ||
| let(:double_address_verification) { true } |
There was a problem hiding this comment.
I would be inclined to test with DAV both on/off until it's enabled in prod.
|
You will also need to redact some errors from the log, similar to this: |
|
I removed several feedback items since the messaging makes sense & @allis-green approves. That leaves the log redaction (required) and the additional automated testing (recommended). |
This feels like an easy thing to overlook and would have had bad consequences if not had you caught it. Perhaps separately, can we consider some options to try to catch this sooner, like changing errors to allowlist-only, or enhancing the FakeAnalytics PiiAlerter utility to catch these mock IPP values? |
@aduth It makes sense to add some additional detection. I feel like our team could add a story to check for |
|
spec/features/idv/in_person_spec.rb
Outdated
| fill_in t('in_person_proofing.form.state_id.first_name'), with: 'T0mmy "Lee"' | ||
| fill_in t('in_person_proofing.form.state_id.last_name'), with: 'Джейкоб' | ||
| click_idv_continue | ||
| # binding.pry |
There was a problem hiding this comment.
Remove this debugging code.
| # binding.pry |
app/forms/idv/state_id_form.rb
Outdated
| @@ -23,6 +23,9 @@ def submit(params) | |||
| cleaned_errors = errors.deep_dup | |||
There was a problem hiding this comment.
@svalexander I realized I made a mistake when originally working on this, and that's why FakeAnalytics didn't catch the issue here. This change will fix the issue.
| cleaned_errors = errors.deep_dup | |
| cleaned_errors = errors.dup |
I'd appreciate if you make the same change to address_form.rb as well.
@aduth FYI I think this is part of the issue here, i.e. ActiveModel::Error supports dup for cloning, but not deep_dup. There may also be issues when trying to print out the contents of these error objects directly.
🎫 Ticket
LG-9229
🛠 Summary of changes
Add transliteration validation for address line 1, address line 2 and city.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
in_person_capture_secondary_id_enabledto true* for address lines
#1 $treet lañe^should identify$, ^as characters that need to be replaced* for city line
B3st C!tyshould identify3, !as characters that need to be replaced👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.