From deb00803b5bb88d7f2c977dd0cf7562b6bb69f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=C3=ADna=20Vysko=C4=8Dilov=C3=A1?= Date: Wed, 29 Nov 2017 18:48:15 +0100 Subject: [PATCH] Add zipcode validation for Czech republic --- includes/class-wc-validation.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-wc-validation.php b/includes/class-wc-validation.php index 8e5bd0ccba1..d043536ef61 100644 --- a/includes/class-wc-validation.php +++ b/includes/class-wc-validation.php @@ -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;