title: Best way to control Error Message for decimal validation in ViewModel property validation?
body: <p>I have a ViewModel property:</p>
  
  <pre><code>public decimal decProperty { get; set; }
  </code></pre>
  
  <p>I have found it difficult to customise the Error message for the above. However if I code the following, I can specify the error message.</p>
  
  <pre><code>[RegularExpression(@"\d+(\.\d{1,2})?", ErrorMessage = "Invalid decimal")]
  public string strProperty { get; set; }
  </code></pre>
  
  <p>Ideally I just want to keep the type as "decimal?". How could I just specify "Invalid decimal" in this case?</p>
  
  <p>Thanks.</p>