Add zipcode validation for Czech republic

This commit is contained in:
Karolína Vyskočilová 2017-11-29 18:48:15 +01:00 committed by GitHub
parent 64ffa22e16
commit deb00803b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ class WC_Validation {
case 'PL':
$valid = (bool) preg_match( '/^([0-9]{2})([-])([0-9]{3})$/', $postcode );
break;
case 'CZ':
$valid = (bool) preg_match( '/^([0-9]{3})( ?)([0-9]{2})$/', $postcode );
break;
default :
$valid = true;