Previous days writing form validation is a very big task. Two-three years back I wrote my first form validation for a project. First time when I wrote that I really felt difficult. I remember it took nearly One day to write all validations(Including Regular Expressions).
This a very simple one just see the code below you will under stand.
<input type="email" placeholder="Enter your email" />
2)Field Required Validation
<input type="email" placeholder="To test leave this blank and click submit" required="required" />
<input type="url" placeholder="Enter Url " />
<input type="date" placeholder="Date only" />
<input type="number" placeholder="Number only" />
<input type="number" placeholder="Enter between 1-8" min="1" max="8" />
7)Regular Express Validations
<input type="text" placeholder="Caps only" pattern="[A-Z]" />