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:
Brian 2020-07-17 11:50:51 +02:00 committed by GitHub
parent 601c7263b8
commit bf92d07442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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;