mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Allow international addresses in spreadsheets
For services with permission, they can now put international addresses into their spreadsheets without getting a postcode error. This also means they can start using address line 7 instead of postcode, since it doesn’t make sense to put a country in a field called ‘postcode’. But this will be undocumented to start with, because we’re not giving any real users the permission. It does now mean that the number of possible placeholders (7 + postcode) is greater than the number of allowed placeholders (7), so we have to account for that in the one-off address flow where we’re populating the placeholders automatically. We’re sticking with 6 + postcode here for backwards compatibility.
This commit is contained in:
@@ -84,8 +84,12 @@
|
||||
Address must be at least {{ letter_min_address_lines }} lines long
|
||||
{% elif item.as_postal_address.has_too_many_lines %}
|
||||
Address must be no more than {{ letter_max_address_lines }} lines long
|
||||
{% elif not item.as_postal_address.postcode %}
|
||||
Last line of the address must be a real UK postcode
|
||||
{% elif not item.as_postal_address.has_valid_last_line %}
|
||||
{% if item.as_postal_address.allow_international_letters %}
|
||||
Last line of the address must be a UK postcode or another country
|
||||
{% else %}
|
||||
Last line of the address must be a real UK postcode
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user