HTML

HTML FORM VALIDATION WITHOUT JAVASCRIPT

1) RESTRICTED FIELD TYPES

<input type="email"/> <input type="number"/> <input type="url"/> <input type="date"/> <input type="time"/> <input type="datetime-local"/>

2) FIELD RESTRICTIONS

Required, 2 to 8 characters. <input type="text" required   minlength="2" maxlength="8"/>   Required, number from 1 to 12. <input type="number" required   min="1" max="12"/>

3) PATTERNS

Enter "Doge" or "Cate" <input type="text" pattern="Doge|Cate"/>   Enter "Doge" (Case Insensitive) <input type="text" pattern="[Dd][Oo][Gg][Ee]"/>   Matches (0 to 9) 3 times  <input type="text" pattern="[0-9]{3}"/> Matches (0 to 9) 1 to 3 times <input type="text" pattern="[0-9]{1,3}"/>   Start with "T", followed by 3 characters, end with X  <input type="text" pattern="T.{3}X"/>