title: @Pattern validation on a blank field
body: <p>I am using validation annotations to validate the Email field, Here the email field is not mandatory, Still when I click on submit, It is validating and throwing error message when the field is empty,</p>
  
  <p>Here are the annotations:</p>
  
  <pre><code>@Pattern(regexp = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$", 
              message = "registration.label.useremailformat.invalidformat")
  @Size(min = 6, max = 20, message = "registration.label.useremail.length")
  @SafeHtml
  private String userEmailId;
  </code></pre>
  
  <p>How can I skip @Pattern validation when the email field is empty and validate only when the value is given? Any help would be highly appreciated.</p>