Eircode regex
This commit is contained in:
parent
1e227dcc2e
commit
78f34aed99
|
@ -69,6 +69,9 @@ class WC_Validation {
|
|||
case 'GB':
|
||||
$valid = self::is_gb_postcode( $postcode );
|
||||
break;
|
||||
case 'IE':
|
||||
$valid = (bool) preg_match( '/([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}/', wc_normalize_postcode( $postcode ) );
|
||||
break;
|
||||
case 'JP':
|
||||
$valid = (bool) preg_match( '/^([0-9]{3})([-])([0-9]{4})$/', $postcode );
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue