add postcode validation for liechtenstein
added the postcode validation for liechtenstein. max. 4 digits has to start with 94** second * can only be a 8 or a 9
This commit is contained in:
parent
601c7263b8
commit
bf92d07442
|
@ -102,6 +102,9 @@ class WC_Validation {
|
|||
case 'SI':
|
||||
$valid = (bool) preg_match( '/^([1-9][0-9]{3})$/', $postcode );
|
||||
break;
|
||||
case 'LI':
|
||||
$valid = (bool) preg_match( '/^(94[8-9][0-9])$/', $postcode );
|
||||
break;
|
||||
default:
|
||||
$valid = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue