Merge pull request #27546 from KoolPal/patch-1
Updated - Added postcode validation for India
This commit is contained in:
commit
0b41aff81b
|
@ -79,6 +79,9 @@ class WC_Validation {
|
|||
case 'IE':
|
||||
$valid = (bool) preg_match( '/([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}/', wc_normalize_postcode( $postcode ) );
|
||||
break;
|
||||
case 'IN':
|
||||
$valid = (bool) preg_match( '/^[1-9]{1}[0-9]{2}\s{0,1}[0-9]{3}$/', $postcode );
|
||||
break;
|
||||
case 'JP':
|
||||
$valid = (bool) preg_match( '/^([0-9]{3})([-]?)([0-9]{4})$/', $postcode );
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue