title: How to add ng-pattern in mvc @Html.TextBoxFor(...)?
body: <p>I get an error for ng-pattern...how can i add it in <code>@Html.TextBoxFor</code>? I tried with ng-pattern also but same result...it throw me an error...i know that is for ng-model in mvc i need to use ng_model but for ng-pattern is not working</p>
  
  <pre><code>    div class="form-group"&gt;
      &lt;label for="licencenumber" class="control-label col-lg-5 col-md-6"&gt;@Html.Label(@Translator.Translate("LICENCE_NUMBER")): &lt;span id="licenceNumberRequired" class="required display"&gt;*&lt;/span&gt;&lt;/label&gt;
    &lt;div class="col-lg-7 col-md-6"&gt;
    @Html.TextBoxFor(m =&gt; m.DocumentNumber, new { @class = "form-control", id = "documentNumber", @maxlength = "13", ng_model="documentNumber",ng_pattern="^/[\w ]+$/" })
  
      &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>