Shortcut for General Form validations 





👉Name Feild  : Here we would only want user to enter alphabets and white spaces if you are accepting full name and last name through same feild 


Soln: <input type="text" placeholder="Name" name="name" id="name" onkeypress="return (event.charCode > 64 && event.charCode < 91) || (event.charCode > 96 && event.charCode < 123 || event.charCode == 32)" >


👉Indian Phone Number : Here we would only want user to enter number of length 10 digits and  starting with digit 7, 8, or 9.

Soln: <input type="tel" name="contact_no" placeholder="Number"  id="contact_no" pattern="/(7|8|9)\d{9}/" title="Please Enter a valid indian phone number" onKeyPress="if(this.value.length==10) return false;" />


👉Email Feild : Just write input type email and it handle the rest .