title: MVC View not displaying validation errors
body: <p>i've got some validations in my mvc project. However, when i sumbit an empty form or form where some required fields have not been entered, it does not stay within the same form/view and show the errors. I cant see any modal errors (i.e amount is required field)</p>
  
  <p>for example, here are some attributes in my modal</p>
  
  <pre><code>    [Required]
      [StringLength(1, MinimumLength = 1)]
      public string Period { get; set; }
  
      [Required]
      [DataType(DataType.DateTime)]
      public System.DateTime ModifyDate { get; set; }
  </code></pre>
  
  <p>Here is my controller</p>
  
  <pre><code>[HttpPost]
           public ActionResult StopScheduled([Bind(Prefix = "item")]  BillPayModel model)
           {
               //getUsers();
  
               try
               {
                   if (ModelState.IsValid)
                   {
  
                      //save stuff into db
                       db.SaveChanges();
  
                   }
                   else
                   {
                       ModelState.AddModelError("", "Could not Stop Scheduled Payment");
                   }
               }
  
  
               catch (FormatException)
               {
                   ModelState.AddModelError("", "Could not Stop Scheduled Payment");
               }
  
  
               return RedirectToAction("StopScheduled");
           }
  
      }
  </code></pre>
  
  <p>here is my view</p>
  
  <pre><code>@if (Model !=null)
  {
      if (Model.IsSuccess == true)
      {
          &lt;span&gt;&lt;center&gt;&lt;font color = "green"&gt;Successfully Completed Transaction!  &lt;/font&gt;&lt;/center&gt;&lt;/span&gt;
      }
      else
      {
           @Html.ValidationSummary(true, "ERROR! Please make sure you have entered correct details"); 
      }
  }
  
  @if (Model ==null)
  { 
      using (Html.BeginForm("BillPay", "BillPay", FormMethod.Post, new {}))
      {
          @Html.ValidationSummary(true);
  
          &lt;div&gt;@Html.LabelFor(model =&gt; model.AccountNumber)&lt;/div&gt;
           @Html.DropDownList("Accounts",  "-- Select User --")  
  
          &lt;div&gt;@Html.LabelFor(model =&gt; model.PayeeID)&lt;/div&gt;
          @Html.DropDownList("PayeeID",  "-- Select User --")         
  
  
          &lt;div&gt;@Html.LabelFor(model =&gt; model.Amount)&lt;/div&gt;
          &lt;div&gt;@Html.TextBoxFor(model =&gt; model.Amount,new {style = "width:150px"})
              @Html.ValidationMessageFor(model =&gt; model.Amount)
          &lt;/div&gt;        
  
          &lt;div&gt;@Html.LabelFor(model =&gt; model.ScheduleDate) (i.e 20/10/2013 10:00)&lt;/div&gt;
          &lt;div&gt;@Html.TextBoxFor(model =&gt; model.ScheduleDate,new {style = "width:250px"})
              @Html.ValidationMessageFor(model =&gt; model.ScheduleDate)
          &lt;/div&gt;
  
          &lt;div&gt;@Html.LabelFor(model =&gt; model.Period)&lt;/div&gt;
          &lt;div&gt;@Html.TextBoxFor(model =&gt; model.Period,new {style = "width:150px"})
              @Html.ValidationMessageFor(model =&gt; model.Period)
          &lt;/div&gt; 
  
          &lt;input type="submit" value ="Submit" style="width:8%;height:5%"/&gt; 
          &lt;input type="reset" value ="reset" style="width:8%;height:5%"/&gt;   
      }
  }
  else
  {
  
  }
  </code></pre>