Spanish postcode format

Closes #10529
This commit is contained in:
Mike Jolley 2016-03-10 12:17:49 +00:00
parent 9ce892bd39
commit 1cf4543137
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ class WC_Validation {
case 'DE' :
$valid = (bool) preg_match( '/^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$/', $postcode );
break;
case 'ES' :
$valid = (bool) preg_match( '/^([0-9]{5})$/i', $postcode );
break;
case 'GB' :
$valid = self::is_GB_postcode( $postcode );
break;