src/icepay_api_order.php
public static function validateZipCode($zipCode, $country) {
        switch (strtoupper($country)) {
            case 'NL':
                if (preg_match('/^[1-9]{1}[0-9]{3}[A-Z]{2}$/', $zipCode))
                    return true;
                break;
            case 'BE':
                if (preg_match('/^[1-9]{4}$/', $zipCode))
                    return true;
                break;
            case 'DE':
                if (preg_match('/^[1-9]{5}$/', $zipCode))
                    return true;
                break;
        }

        return false;
    }
public static function validateZipCode($zipCode, $country) {
        switch (strtoupper($country)) {
            case 'NL':
                if (preg_match('/^[1-9]{1}[0-9]{3}[A-Z]{2}$/', $zipCode))
                    return true;
                break;
            case 'BE':
                if (preg_match('/^[1-9]{4}$/', $zipCode))
                    return true;
                break;
            case 'DE':
                if (preg_match('/^[1-9]{5}$/', $zipCode))
                    return true;
                break;
        }

        return false;
    }
public static function validateZipCode ( $ zipCode , $ country ) { switch ( strtoupper ( $ country ) ) { case 'NL' : if ( preg_match ( '/^[1-9]{1}[0-9]{3}[A-Z]{2}$/' , $ zipCode ) ) return true ; break ; case 'BE' : if ( preg_match ( '/^[1-9]{4}$/' , $ zipCode ) ) return true ; break ; case 'DE' : if ( preg_match ( '/^[1-9]{5}$/' , $ zipCode ) ) return true ; break ; } return false ; }
Validates a zipcode based on country

@since 1.0.0
@param string $zipCode A string containing the zipcode
@param string $country A string containing the ISO 3166-1 alpha-2 code of the country
@example validateZipCode('1122AA', 'NL')
@return boolean
Validates a zipcode based on country