QuizNot attempted
Native validation
1–4 to choose, Enter to submit
Show answer & explanation
Correct answers:
required,minlength,pattern,type="email"- The
:invalid/:user-invalidCSS pseudo-classes for styling form.checkValidity()andinput.validity
- Constraint validation is native: attributes like
required,minlength,pattern,type="email" - CSS hooks
:invalidand:user-invalid(only after interaction, so no red fields on load) - and the JS API
checkValidity(),validity,setCustomValidity(). - Not validate=true: no such attribute exists (the opposite,
novalidate, does). - Always validate again on the server.