Add austrian postcode validation
This commit is contained in:
parent
bfe26a2aa3
commit
18bfce0747
|
@ -52,6 +52,9 @@ class WC_Validation {
|
|||
}
|
||||
|
||||
switch ( $country ) {
|
||||
case 'AT' :
|
||||
$valid = (bool) preg_match( '/^([0-9]{4})$/', $postcode );
|
||||
break;
|
||||
case 'BR' :
|
||||
$valid = (bool) preg_match( '/^([0-9]{5})([-])?([0-9]{3})$/', $postcode );
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue