Please add support for Swiss:

<?php

/**
 * @file
 * Postal code validation functions for Swiss.
 */

/**
 * Implements _postal_code_validation_validate_COUNTRYCODE().
 */
function _postal_code_validation_validate_CH($postal_code) {
  $return = array('country' => 'CH');
  if (preg_match('/^[0-9]{4}$/', $postal_code)) {
    $return['postal_code'] = $postal_code;
  }
  else {
    $return['error'] = 'Invalid postal code. Postal codes in Swiss are like "9999".';
  }
  return $return;
}

Comments

liam morland’s picture

Status: Active » Fixed

Fixed in 9b21f7c. Danke!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.