For Adobe ColdFusion application servers ZIPCode

ZIPCode validates a US ZIP code of the form ##### #####-####, providing equivalent functionality to the <cfinput validate="zipcode"> tag. . It does not verify that the code is valid - merely that the format is correct. The primary components of this preset are a regular expression to validate the postcode, and a custom error message. Note that this preset is unsuitable for use on forms exposed to an international audience as ZIP / postal code formats vary widely. This preset could easily be adapted for other formats.

Examples

The plain preset:

<cf_terrafield
  preset="ZIPCode"
  name="MyZIPCode1"
/>

No comments yet