From 18bfce07479f25f35e7cc6a6e21379015e4d8e8e Mon Sep 17 00:00:00 2001 From: Philip Salzmann Date: Mon, 23 May 2016 13:32:16 +0200 Subject: [PATCH] Add austrian postcode validation --- 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 e7fcac52afc..3c6431de33e 100644 --- a/includes/class-wc-validation.php +++ b/includes/class-wc-validation.php @@ -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;