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
It looks wrong to me to have the province (%S) separated by a space. Instead, one of the following changes would make most sense:
Put it in parentheses. That appears to be the more idiomatic formatting, but it seems to make it harder to make the province be optional.
Add an optional field fmt_admin1 which, when present, indicates a format to use for the admin1 field if present. Then set fmt_admin1 to "(%S)" for Spain.
Make it a newline (%n) instead of a space. This is a simple fix that libaddressinput supports and that is also supported by the postal service.
Regarding the first point, out in the wild, a well-formatted Spanish address seems to leave out the province if it's obvious. For example, for the city of Barcelona, one would write Barcelona by itself rather than write "Barcelona (Barcelona)". For that reason, it may be problematic to make the format string as simple as "%N%n%O%n%A%n%Z %C (%S)". When the admin1 is not present, the address would end up with empty parentheses.
The text was updated successfully, but these errors were encountered:
The address format for Spain is currently as follows:
It looks wrong to me to have the province (%S) separated by a space. Instead, one of the following changes would make most sense:
Regarding the first point, out in the wild, a well-formatted Spanish address seems to leave out the province if it's obvious. For example, for the city of Barcelona, one would write Barcelona by itself rather than write "Barcelona (Barcelona)". For that reason, it may be problematic to make the format string as simple as "%N%n%O%n%A%n%Z %C (%S)". When the admin1 is not present, the address would end up with empty parentheses.
The text was updated successfully, but these errors were encountered: