Validate US ZIP Code

by Kyle on

This regular expression accepts both 5- and 9-digit ZIP codes.

^[0-9]{5}(-[0-9]{4})?$

Hide Sidebar