Hi, I am adding some JavaScript to validate a contactus form, and the javascript for the name and email is fine, but I'm thinking that trying to validate an actual address, such as where a person lives varies so much that forming validation on the field is not really possible. Is there a way of doing this at all? Thanks go to anyone who can advise me. Thank you.
you could have four fields: house number / unit number street name street type (drop down) and then your state,postcode,country etc. I have seen this done on some websites.
You could restrict the address field to alphanumeric characters (is there anywhere where there are other characters used?) and make it so it is at least a set number of characters - I dunno what would work, but more than 4, at least? That might work - dunno if it's best practice, as I don't know if it would be possible to have a valid address not matching those criteria.
also try imask - great concept - http://zendold.lojcomm.com.br/imask/ as for address validation, look for PAF (uk based anyway)