added BR postcode validation
This commit is contained in:
parent
1c6e63fe0a
commit
bb2cc2b035
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue