Add austrian postcode validation

This commit is contained in:
Philip Salzmann 2016-05-23 13:32:16 +02:00
parent bfe26a2aa3
commit 18bfce0747
1 changed files with 3 additions and 0 deletions

View File

@ -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;