title: Is using data-val="true" the right approach , to force the required validation
body: <p>I have the following view inside my asp.net mvc web application :-</p>
  
  <pre><code>@using (Ajax.BeginForm("CheckUserPermision", "SecurityRole", 
  new AjaxOptions
  {
      HttpMethod = "get",
      InsertionMode = InsertionMode.Replace,
      LoadingElementId = "progress2",
      UpdateTargetId = "userSecurityRole"
  }))
  {
  
  
    &lt;div&gt;
      &lt;span class="f"&gt;User Name &lt;/span&gt; 
          &lt;input  name="username" type="text" data-val="true" data-val-required= "Please enter a value." data-autocomplete-source= "@Url.Action("AutoComplete", "SecurityGroup")"  /&gt; 
  &lt;span class="field-validation-valid" data-valmsg-for="username" data-valmsg-replace="true"&gt;&lt;/span&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>currently the users will not be able to do a search unless they enter text inside the "User name" field. but my question is weather using <code>data-val="true</code>" the right approach to force Required field validation ?</p>