Mahmoud Noaman

Mahmoud Noaman

  • NA
  • 56
  • 6.7k

MVC Validation Web Form

Nov 8 2016 4:05 PM
i have dowonloaded html form template ,and now i am using it 
how can i add some validation to it like an specific text filed must be integer
,required field
example of my html form here
<form action="/" method="post">
<div class="top-row">
<div class="field-wrap">
<label>
First Name<span class="req">*</span>
</label>
<input type="text" required autocomplete="off" />
</div>
<div class="field-wrap">
<label>
Last Name<span class="req">*</span>
</label>
<input type="text" required autocomplete="off" />
</div>
</div>
<div class="field-wrap">
<label>
Email Address<span class="req">*</span>
</label>
<input type="email" required autocomplete="off" />
</div>
<div class="field-wrap">
<label>
Set A Password<span class="req">*</span>
</label>
<input type="password" required autocomplete="off" />
</div>
<button type="submit" class="button button-block" />Get Started</button>
</form>
 

Answers (2)