Is there a Zip code validation Regex code library?
Hi All,
We need to check and validate the Postal codes in our database for all the countries and I see that we have these built-in format validations for these countries:
Do you know if there is a library in Aperture for regex codes to check the Postal code format for all the countries?
Many thanks!
Kind regards,
Vera
Answers
-
Hi Vera
You want to "check and validate the Postal codes in our database for all the countries". You have found the native Functions to check the format is correct, but have not detailed the challenge you are running into?
0 -
Hi Josh,
we only have the mentioned format checks but not for ALL the countries. Only to CA, FR, DE, UK, US.
So my challenge is to find a way to check for all the other countries.
Thanks!
Vera
0 -
OK thanks yes that makes sense. We do not use regex to check the format for other countries (most customers usually Validate the entire address at that point), but it should be possible to build out country specific format checks using regex and from some quick googling it looks like multiple countries would be the same which makes things easier (though not certain this is up to date): https://stackoverflow.com/questions/578406/what-is-the-ultimate-postal-code-and-zip-regex
1 -
Hi Josh,
okay, yes I also googled it but these regex codes are not working as expected, but anyway if there is nothing, I will create my own library :)
Thanks!
Vera
0 -
If your regex is not working then this discussion might help understand why:
0