added BR postcode validation

This commit is contained in:
claudiosmweb 2013-10-18 15:56:36 -03:00
parent 1c6e63fe0a
commit bb2cc2b035
1 changed files with 6 additions and 1 deletions

View File

@ -57,6 +57,11 @@ class WC_Validation {
return true;
else
return false;
case "BR" :
if ( preg_match( "/^[0-9]{5,5}([-]?[0-9]{3,3})?$/", $postcode ) )
return true;
else
return false;
}
return true;
@ -145,4 +150,4 @@ class WC_Validation {
public static function format_phone( $tel ) {
wc_format_phone_number( $tel );
}
}
}