An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
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. :)
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)