I'm using jQuery to validate form elements on an MVC form and this is my regular expression to validate zip codes:
^(\d{5})|(\d{5}-\d{4})$
It validates a 5-digit zip code just fine, but the red box around the text box input element remains—er, comes back—when I add a hyphen and 4 more digits.
Why?