Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Mailing Address Format Validation #74

Open
insightindustry opened this issue Jan 9, 2021 · 0 comments
Open

Support Mailing Address Format Validation #74

insightindustry opened this issue Jan 9, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@insightindustry
Copy link
Owner

Given the localization themes of v.1.6.0, it may be helpful to support the automatic formatting of a single mailing address string given a componentized input. In other words:

  • validators.mailing_address(street_type = None, street_name = None, ..., country = None) with other mailing address components provided as optional keyword arguments. The returned result would be a single str with a properly-formatted mailing address for the country provided.
  • validators.mailing_address_components(value, country = None) which tries to parse a set of the components of a mailing address (e.g. street number, street name, city, etc.) from a single mailing address string and returns a dict with the relevant components parsed from value for country (if supplied, or from the first matching country if empty).
  • checkers.is_mailing_address(value, country = None) which tries to validate the string in value as a valid mailing address

In other words, the functions should be internally consistent: validators.mailing_address_components() should produce a set of keyword arguments which can then be passed to validators.mailing_address() to re-create the value passed to validators.mailing_address_components() in the first place.

@insightindustry insightindustry added the enhancement New feature or request label Jan 9, 2021
@insightindustry insightindustry added this to the 1.6.0 milestone Jan 9, 2021
@insightindustry insightindustry self-assigned this Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant