1

We are currently looking at adding validation to our form that enables users to enter an address manually if they don't/can't/won't use the postcode lookup software

99% of our addresses will be UK but I am struggling to find any definitive article/paper that tells me what special characters are NOT permitted in address lines.

There are obvious characters that are permitted (eg: forward slash to cater for c/o) but we want to make sure our validation is correct and standard

5
  • I'm not aware of an international standard but I wonder what the purpose of the validation would be. If it is for system constraints you should follow that constraint. If it is for preventing user errors, is it enough to just validate characters or are you doing other things as well?
    – jazZRo
    Jul 5, 2021 at 7:23
  • Why reinvent this wheel? Jul 5, 2021 at 11:49
  • What service are you providing, and why do you feel it is your responsibility to ensure that the user enters their address correctly?
    – musefan
    Jul 5, 2021 at 13:30
  • 1
    I would start with the Royal Mail website; they do have information on how to properly address an envelope. Following that, check any organizations/agencies that register and/or regulate company names. Jul 5, 2021 at 16:52
  • What makes you think that there are any characters that are universally invalid? And even if the do exist, they must be rare enough that they really aren't worth bothering about. Jul 26, 2023 at 0:50

1 Answer 1

0

I would personally look up how food delivery companies' address input field works when asking for the address. Both because you can see what characters are permitted and not and also get a feel of how people who enter their address on diverse websites are used to do it.

Other than that you should build your validator to make sure that you can verify and check the validity of the address without necessarily restricting the user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.