Key facts
What does the required attribute do?
required is a boolean attribute for <input>, <select> and <textarea>. While a required control has no value, the browser cancels a normal submit, usually focuses the control and shows its validation message. The check runs only in the browser, so a request sent straight to your endpoint skips it.
| Fact | Detail |
|---|---|
| Attribute type | Boolean: its presence turns it on. required, required="" and required="required" all mean the same, and required="false" is still required. |
| Works on | <input> (text-like, date and time, number, checkbox, radio and file types), <select> and <textarea>. |
| Ignored on | type="hidden", range, color and button types, on a readonly text, number or date field or <textarea>, and on any disabled control. |
| When it runs | On every normal submit: a submit button, Enter in a text field, or form.requestSubmit(). novalidate, formnovalidate and form.submit() skip it. |
| JavaScript | el.validity.valueMissing is true while a required control is empty. form.checkValidity() runs the checks; form.reportValidity() also shows the message. |
| CSS | :required and :optional follow the attribute. :invalid matches an empty required field as soon as the page loads; :user-invalid waits until the person edits it or tries to submit. |
| Screen readers | Native required is announced to assistive technology, so aria-required is mainly for custom controls that are not native form fields. |
| Security | None. Anyone can POST to the form's action URL without running it, so check required fields on the server. |
Browser validation can be skipped; splitforms still filters spam and saves each accepted submission, so check required fields in your webhook handler before acting on a submission. Webhooks come with Pro ($5/month) or Annual ($49/year). Checked against the splitforms submit code on 2 October 2026.
Sources: WHATWG HTML Standard: the required attribute · WHATWG: boolean attributes · WHATWG: interactively validate the constraints · MDN: required · MDN: aria-required




