Skip to content

LG-11118: zip code format validation#9802

Merged
dawei-nava merged 1 commit intomainfrom
dwang/LG-11118-zipcode-validation
Dec 20, 2023
Merged

LG-11118: zip code format validation#9802
dawei-nava merged 1 commit intomainfrom
dwang/LG-11118-zipcode-validation

Conversation

@dawei-nava
Copy link
Contributor

@dawei-nava dawei-nava commented Dec 19, 2023

🎫 Ticket

LG-1118: zip code validation

🛠 Summary of changes

Basic zip code validation for zip+4 for US and territories postal code format.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Step 1: Start document capturing session
  • Step 2: Use following test yml file
    document:
      type: license
      first_name: Susan
      last_name: Smith
      middle_name: Q
      address1: 1 Microsoft Way
      address2: Apt 3
      city: Bayside
      state: NY
      zipcode: '113642'
      dob: 10/06/1938
      phone: +1 314-555-1212
      state_id_number: '123456789'
      state_id_type: drivers_license
  • Step 3: Warning page should shows and asking to "Take a new picture".

changelog:  Internal, Doc Auth, Validate zip code having zip+4 format.
@dawei-nava dawei-nava marked this pull request as ready for review December 19, 2023 20:01
Copy link
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

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

I reviewed the code and did a manual QA. Looks good!

@dawei-nava dawei-nava merged commit 923fc91 into main Dec 20, 2023
@dawei-nava dawei-nava deleted the dwang/LG-11118-zipcode-validation branch December 20, 2023 15:32
def zipcode_valid?
return if zipcode.is_a?(String) && zipcode.present?

errors.add(:zipcode, generic_error, type: :zipcode)
Copy link
Contributor

@aduth aduth Dec 20, 2023

Choose a reason for hiding this comment

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

This appears to have been the only reference to the generic_error method, so we probably ought to remove the method definition as being unreachable code.

Copy link
Contributor

Choose a reason for hiding this comment

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

@aduth Good point, I made a follow-up ticket.

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.

3 participants