Add postcode validation for Bosnia and Herzegovina

This commit is contained in:
Damir Ha 2020-07-16 13:52:01 +02:00
parent 24bd19c517
commit 9a5d920bdb
1 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,9 @@ class WC_Validation {
case 'AT':
$valid = (bool) preg_match( '/^([0-9]{4})$/', $postcode );
break;
case 'BA':
$valid = (bool) preg_match( '/^([7-8]{1})([0-9]{4})$/', $postcode );
break;
case 'BR':
$valid = (bool) preg_match( '/^([0-9]{5})([-])?([0-9]{3})$/', $postcode );
break;