12-16-2007, 02:52 AM
|
#25 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Posts: 41
Thanks: 24
|
Quote:
Originally Posted by Matt83
Postal Codes:
PHP Code:
$string = "55324-4324";
if (preg_match('/^[0-9]{5,5}([- ]?[0-9]{4,4})?$/', $string)) {
echo "example 4 successful.";
}
|
Looks like validating postal codes only work for US Postal Codes. Austalaia has 4 digit zip codes and UK has letters ...Is there a way to make the Postal Code validation work internationally?
__________________
"Things you can get access to, you should never memorize." -Albert Einstein
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
|
|
|
|