Check for invalid chars in letter addresses

This now adds validation for invalid characters on the
LetterAddressForm for one off letters. It also adds a validation failed
message for uploaded letters, precompiled letters sent through the API,
and CSV rows with errors.
This commit is contained in:
Katie Smith
2020-07-28 13:44:14 +01:00
parent 0304edd7a2
commit ba5f7d7c36
5 changed files with 40 additions and 2 deletions

View File

@@ -90,6 +90,8 @@
{% else %}
Last line of the address must be a real UK postcode
{% endif %}
{% elif item.as_postal_address.has_invalid_characters %}
Address lines must not start with any of the following characters: @ ( ) = [ ] ” \ / ,
{% endif %}
</span>
{% endcall %}