Merge pull request #27244 from jgreys/fix/27108
Fix Japan zip code format issue #27108
This commit is contained in:
commit
0125eca73c
|
@ -80,7 +80,7 @@ class WC_Validation {
|
|||
$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 );
|
||||
$valid = (bool) preg_match( '/^([0-9]{3})([-]?)([0-9]{4})$/', $postcode );
|
||||
break;
|
||||
case 'PT':
|
||||
$valid = (bool) preg_match( '/^([0-9]{4})([-])([0-9]{3})$/', $postcode );
|
||||
|
|
Loading…
Reference in New Issue