Make NL postcode validation more flexible
Allows postcode without spaces and in lowercase.
This commit is contained in:
parent
2e90e9ab65
commit
e04e9ae521
|
@ -94,7 +94,7 @@ class WC_Validation {
|
|||
$valid = (bool) preg_match( '/^([0-9]{3})(\s?)([0-9]{2})$/', $postcode );
|
||||
break;
|
||||
case 'NL':
|
||||
$valid = (bool) preg_match( '/^[1-9][0-9]{3}\s(?!SA|SD|SS)[A-Z]{2}$/', $postcode );
|
||||
$valid = (bool) preg_match( '/^([1-9][0-9]{3})(\s?)(?!SA|SD|SS|sa|sd|ss)[A-Za-z]{2}$/', $postcode );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue