Implement HTML5 constraint validation (Phase 16)
Add the constraint validation API for form controls:
- ValidityState with all flags: valueMissing, typeMismatch, patternMismatch,
tooLong, tooShort, rangeUnderflow, rangeOverflow, stepMismatch, customError
- Constraint checking for all input types (text, email, url, number,
checkbox, radio), textarea, and select elements
- Built-in regex engine for pattern attribute matching
- CSS pseudo-classes: :valid, :invalid, :required, :optional,
:in-range, :out-of-range
- JS API: validity, validationMessage, willValidate properties;
checkValidity(), reportValidity(), setCustomValidity() methods
- Custom validity messages via setCustomValidity()
- Validation message generation for each constraint type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>