title: How to trim spaces from some POST'ed Form Data that is backed by a .NET EmailAddress DataAnnotation
body: <p>I have a simple Input Model that has an <code>Email</code> property on it. I'm using the <code>EmailAddress</code> DataAnnotation to validate the input data.</p>
  <pre><code>[Required]
  [Display(Name = &quot;UserReview_CustomerEmailTitle&quot;, ResourceType = typeof(Resources.User.Settings))]
  [EmailAddress(ErrorMessageResourceType = typeof(Resources.User.Settings), ErrorMessageResourceName = &quot;UserReview_InvalidEmailMessage&quot;)]
  public string CustomerEmail { get; set; }
  </code></pre>
  <p>It works perfectly (ie. data is valid) if there are no spaces before/after the input data.</p>
  <p>When I have a space at the end of the input text, it fails the validation.</p>
  <p>Is there any tricks I can do to TRIM the input data coming in OR tell the EmailAddress validator to ignore prepended/postpended spaces?</p>
  <h3>EDIT:</h3>
  <p>I'm open to creating a custom attribute... I can't inherit from the <code>EmailAddress</code> attribute because it's <code>sealed</code> (sigh) .. so maybe a regex attribute?</p>