title: zipcode regular expression validation
body: <p>I would like to have a regular expression validator for validating zip code. My zip code length varies up to 9 digits. User can enter either 5 or 9. I should valid if he enters 5 digits or 9 digits. Any thing other than that I would like to raise error.</p>
  
  <p>I tried this expression</p>
  
  <p><code>ValidationExpression="\\d{5}(-\\d{4})?$"</code></p>
  
  <p>This is my design I am using rad controls</p>
  
  <pre><code>&lt;telerik:RadMaskedTextBox Mask="#####-####" runat="server" ID="txtcontactZipCode"
                                                      Width="200px" ValidationGroup="contactValidation"&gt;
                                                  &lt;/telerik:RadMaskedTextBox&gt;
                                                  &amp;nbsp;
                                                  &lt;asp:RequiredFieldValidator runat="server" ID="rqrdcontactZipCode" ValidationGroup="contactValidation" Display="Dynamic"
                                                      ForeColor="Red" ControlToValidate="txtcontactZipCode" ErrorMessage="Zip Code is required"&gt;&lt;/asp:RequiredFieldValidator&gt;
                                                      &lt;asp:RegularExpressionValidator ID="regexpcontactZipCode" runat="server" ControlToValidate="txtcontactZipCode"
                                                          ValidationGroup="contactValidation" Display="Dynamic" ForeColor="Red" ErrorMessage="Should be 5 or 9 Digits"
                                                          ValidationExpression="\\d{5}(-\\d{4})?$"&gt;&lt;/asp:RegularExpressionValidator&gt;
  </code></pre>
  
  <p>But I am unable to valid if I enter as follows <code>11111-____</code></p>
  
  <p>Can some one help me..</p>