title: Range Validation is not working
body: <p>I have used range validation but this is not working. I am adding model,controller and view code.Please help(i have added only related fields only in this code).</p>
  
  <p>Model is :</p>
  
  <pre><code>public class TicketDetailModel : TicketModelBase
      {
          public WorkOnTicketCreateModel WorkOnTicketCreateModel { get; set; }
      }
  public class TicketModelBase
      {
          [Required]
          [Range(1, int.MaxValue, ErrorMessage = "Please enter a value bigger than {0}")]
          public int EstimatedTime { get; set; }
          public virtual List&lt;WorkOnTicket&gt; WorkOnTickets { get; set; }
      }
  public class WorkOnTicketCreateModel : WorkOnTicketModelBase
      {
          [Required]
          [Display(Name = "AssignedToUser")]
          public int AssignedToUserId { get; set; }
          public IEnumerable&lt;SelectListItem&gt; AssignedUser { get; set; }
  
          [Required]
          [Display(Name = "Ticket Status")]
          public int TicketStatusId { get; set; }
  
          public TicketStatus TicketStatusVal { get; set; }
  
          public IEnumerable&lt;SelectListItem&gt; TicketStatus { get; set; }
  
      } 
  public class WorkOnTicketModelBase
      {
          public int Id { get; set; }
  
          [Required]
          public int EstimateHours { get; set; }
  
          [Required]
          [Range(1, int.MaxValue, ErrorMessage = "Please enter a value bigger than {0}")]
          public int WorkedHours { get; set; }
  
      }
  Contoller:
          [HttpPost]
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult Details(TicketDetailModel model, IEnumerable&lt;HttpPostedFileBase&gt; file)
          {
              using (ITransaction transaction = this.nhSession.BeginTransaction())
              {
  
                  var ticketObj = this.nhSession.QueryOver&lt;Ticket&gt;().Where(t =&gt; t.Id == model.Id).SingleOrDefault();
                  var workOnTicket = new WorkOnTicket();
  
               workOnTicket.Ticket = ticketObj;
                      workOnTicket.WorkedHours = model.WorkOnTicketCreateModel.WorkedHours;
                      workOnTicket.EstimateHours = model.WorkOnTicketCreateModel.EstimateHours;               
                  ticketObj.WorkOnTickets.Add(workOnTicket);
                  this.nhSession.Save(ticketObj);
                  transaction.Commit();
              }
              return RedirectToAction("Details", new { id = model.Id, milestoneId = model.Milestone.Id, projectId = model.Project.Id });
          }
  </code></pre>
  
  <p>View:-</p>
  
  <pre><code>@model AnkTech.TicketManagement.Web.Models.Ticket.TicketDetailModel
  @using (Html.BeginForm("Details", "Ticket", FormMethod.Post, new { enctype = "multipart/form-data" }))
  {   
  @Html.ValidationSummary(true)
   @Html.TextBoxFor(model =&gt; model.WorkOnTicketCreateModel.EstimateHours, new { @id = "work_remaining", @class = "s-mini", size = "2" })
  Worked hours:                                                                            @Html.TextBoxFor(model =&gt; model.WorkOnTicketCreateModel.WorkedHours, new { @id = "worked_hours", @class = "s-mini", size = "2" })
  &lt;input type="submit" value="Submit" tabindex="2" name="commit" id="submit-comment"
   class="gray-btn"&gt;
  }
  </code></pre>
  
  <p>I have deleted all rmaining fields. i have added only fields to which related i am asking, please help.</p>