title: How add custom validation to my razor page?
body: <p>I have razor page in my mvc 4 application .Now imagine i have a simple textbox in my page as follows :</p>
  
  <pre><code>@Html.TextBox("Email")
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;input id="Email" name="Email" type="text" /&gt;
  </code></pre>
  
  <p>how can I do some client-side validation for this field you know something like asp.net web forms validation controls . I want to make it required and write a Regex for it .</p>