Japanese post code validation
Set Japanese post code validation. Please check following site. https://en.wikipedia.org/wiki/Postal_codes_in_Japan
This commit is contained in:
parent
857471843a
commit
2d5d7d1494
|
@ -67,6 +67,9 @@ class WC_Validation {
|
|||
case 'GB' :
|
||||
$valid = self::is_GB_postcode( $postcode );
|
||||
break;
|
||||
case 'JP' :
|
||||
$valid = (bool) preg_match( '/^\d{3}\-\d{4}$/', $postcode );
|
||||
break;
|
||||
case 'PT' :
|
||||
$valid = (bool) preg_match( '/^([0-9]{4})([-])([0-9]{3})$/', $postcode );
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue