Skip to content

Conversation

tuan-nxcr
Copy link

Proposal:
Update example to validate City length between 1-50.

Reasoning:
For lazy developers like me, I started using this package by copying the examples for the addresses because I figured that they were grounded in real-world, common validation rules. I did tweak the State and Zipcode validation to be more general, but then we hit a snag when we realized that Novi, MI (4 characters) is a real US city. This led me to look into the real boundaries and I've landed on this PR as an enhancement to save headaches for other future lazy developers. :)

Source:
https://www.serviceobjects.com/blog/character-limits-in-address-lines-for-usps-ups-and-fedex/ (no minimum, so I assume 1, maximum 50)

Proposal: 
Update example to validate City length between 1-50.

Reasoning:
For lazy developers like me, I started using this package by copying the examples for the addresses because I figured that they were grounded in real-world, common validation rules. I did tweak the State and Zipcode validation to be more general, but then we hit a snag when we realized that Novi, MI (4 characters) is a real US city. This led me to look into the real boundaries and I've landed on this PR as an enhancement to save headaches for other future lazy developers. :)

Source: 
 https://www.serviceobjects.com/blog/character-limits-in-address-lines-for-usps-ups-and-fedex/ (no minimum, so I assume 1, maximum 50)
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.

1 participant