Hello Friends,
Here is a post for Zip code Validation
Zip code : Zip code should be atleast 3 & atmost 10 charcters only , should be alphanumeric & should accept dash(-).
Golden Regards,
Eluminous Support Team
eLuminous Technologies
What will be validation for Zip code ?
Started by eluminoustech, Jul 07 2009 09:40 PM
1 reply to this topic
#1
Posted 07 July 2009 - 09:40 PM
|
|
|
#2
Guest_Jordan_*
Posted 08 July 2009 - 04:46 AM
Guest_Jordan_*
Here is a regular expression to match 12342-1234 or just 12342 in PHP:
To determine if a valid zip code exists:
From: USA's Zip Code Validation in PHP
/^([0-9]{5})(-[0-9]{4})?$/i
To determine if a valid zip code exists:
if(preg_match("/^([0-9]{5})(-[0-9]{4})?$/i",$zip_code)) {
// Match
}
From: USA's Zip Code Validation in PHP


Sign In
Create Account

Back to top









