title: How to properly validate a price/currency field?
body: <p>How can I properly validate a price field when doing postback?
  I have already checked: <a href="https://stackoverflow.com/questions/17730043/how-can-i-validate-a-currency-field">How can I validate a currency field?</a> but that doesn't fulfil my expectations.</p>
  
  <p>I've tried with (and some variations):</p>
  
  <pre><code>[Range(0, (double)decimal.MaxValue)]
  [DataType(DataType.Currency, ErrorMessage = "...")]
  public decimal? Price {get; set;}
  </code></pre>
  
  <p>Problems:</p>
  
  <ul>
  <li>It never uses the [DataType...] attribute to perform validations.</li>
  <li>When the value used is not of decimal type, the issued validation error will be a standard English message that I don't know how to customize and need to.</li>
  <li>If I make it string instead of decimal?, then the range validation will be thrown for non-decimal or negative values, but it will still allow values like: 1.23456, which is not the currency format I'm expecting.</li>
  </ul>
  
  <p>I'm looking for a built-in approach before I have to create my own custom validation or regular expression. Something like:</p>
  
  <pre><code>[EmailAddress()]
  public string ContactEmail {get; set; }
  </code></pre>
  
  <p>This perfectly suits me!</p>