Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Bad value X for attribute “required” on element “input”.

The boolean required attribute, if present, indicates that the user must specify a value for the input before the owning form can be submitted.

If this property is not present, the input will be considered as optional. To mark an input as required, it’s enough to include the property without any value, or pass it the required value as in these examples:

Example:

<input type="text" required>
<input type="text" required="required">

Learn more:

Related W3C validator issues