You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 singlestr
with a properly-formatted mailing address for thecountry
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 adict
with the relevant components parsed fromvalue
forcountry
(if supplied, or from the first matching country if empty).checkers.is_mailing_address(value, country = None)
which tries to validate the string invalue
as a valid mailing addressIn other words, the functions should be internally consistent:
validators.mailing_address_components()
should produce a set of keyword arguments which can then be passed tovalidators.mailing_address()
to re-create the value passed tovalidators.mailing_address_components()
in the first place.The text was updated successfully, but these errors were encountered: