Was just playing around with trying to sort out validation of
depending on what country the user lived in, and was wondering if anyone
done this in a nice way? Seems to me that it would be a relatively
addition to Globalize to add a regex for zip code validation to the
already in there?
Or am I missing a trick?
Depends on what you want.
For example Dutch postal code must adhere to the regular expression
/^\d\d\d\d [A-Z][A-Z]$/, but it is common to accept “1000aa” (no space,
lowercase). While the latter is not valid, it can be trivially
transformed into a valid postal code.
This is not the case for the insane English postal code regular
You can find more on Wikipedia:
Geoff H. schreef: