title: Validation on int data type asp .net mvc3
body: <p>I am getting <code>The value 'abc' is not valid for fieldName.</code> as error message. which is default error message and i want to override it in easier way.<br/>as of now what i have tried is listed below<br/></p>
  
  <ul>
  <li><code>[RegularExpression(@"^\d+$",ErrorMessage="enter numeric value")]</code></li>
  <li><code>[Integer(ErrorMessageResourceType = typeof(appName.Resources.abc.Resource),
                 ErrorMessageResourceName = "error_numeric")]</code></li>
  <li><code>[RegularExpression("([1-9][0-9]*)")]</code></li>
  <li><p><code>Range(1,int.max,ErrorMessage="enter numeric value")</code>
  <br/>but failed to change default error message.
  <br/>
  Suggest me the easiest possible way to do this.
  <br/></p>
  
  <pre><code>   using System;
     using System.Collections.Generic;
     using System.Linq;
     using System.Web;
     using System.ComponentModel.DataAnnotations; 
     using System.Web.Mvc;
  
    namespace blueddPES.ViewModels
       {
       public class ContactViewModel
          {
           [Integer(ErrorMessage="sdfdsf")]
           public int? hp { get; set; }
          }
  </code></pre></li>
  </ul>