-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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 singlestrwith a properly-formatted mailing address for thecountryprovided.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 adictwith the relevant components parsed fromvalueforcountry(if supplied, or from the first matching country if empty).checkers.is_mailing_address(value, country = None)which tries to validate the string invalueas 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request