Form Validation Attributes
HC · Formssyntax
required | minlength="n" | maxlength="n" | pattern="regex" | min="n" | max="n"example
<input type="text" name="zipcode" required pattern="[0-9]{5}" title="Five digit zip code">
<input type="password" name="password" required minlength="8" maxlength="128">
<input type="number" name="age" min="18" max="120">Note Built-in validation runs on form submission and is bypassed by adding formnovalidate to the submit button or novalidate to the form. The title attribute provides a hint message shown when the pattern fails.