street-address-rb / street-address

Detect, and dissect, US Street Addresses in strings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow ZIP only parsing

joshco opened this issue · comments

commented

Feature request. If the input string is simply a ZIP code, eg "10011", then return successfully with just postal_code populated.
When collecting address information from subscribers, ZIP/postal_code is often considered good enough

In your own code: if the input string is all digits and 5 characters long - can you just assume its a zip? Seems like overkill to run a 5 digit character string thru this parsing engine if you can essentially "tell" is already a zip.