title: Validate HTML Textbox
body: <p>I have this textbox:</p>
  
  <pre><code>&lt;%= Html.TextBox("EffectiveDate", Model.EffectiveDate.HasValue ? Model.EffectiveDate.Value.ToString("dd-MMM-yyyy") : "", new { @class = "economicTextBox", propertyName = "EffectiveDate", onchange = "parseAndSetDt(this); ", dataType = "Date" })%&gt;
  </code></pre>
  
  <p>I need JS validation help. If the user has the permission, they can enter any date. If the user doesn't, they can only enter the present date, or dates in the future.</p>
  
  <p>Here is a controller method I have that can get if the user has the permission or not.</p>
  
  <pre><code>[NoCache]
          public ActionResult HasAdvanced()
          {
              if (Chatham.Web.UI.Extranet.SessionManager.DisplayUser.IsInRole("hasICAdvanced"))
              {
                  return Json(
                  new
                  {
                      value = "true"
                  });
              }
              else{
                  return Json(
                  new
                  {
                      value = "false"
                  });
              }
          }
  </code></pre>
  
  <p>What would the Js/JQuery look like? I'm soooo stumped.</p>
  
  <p>Thanks!</p>