0
votes

Trying to fix 2 errors when validating a contact page that I am working on. It does have a <!DOCTYPE html> at the top of the page as inputs with required need to be.

Here is the W3C Link to the results.

Code in question:

<input class="input-box form-control" type="email" placeholder="Email" id="email" name="email" value="" data-error="Please add a valid email address." required>

w3c errors:

Attribute placeholder is only allowed when the input type is e-mail, number, password, search, tel, text, or url.

and

Attribute required is only allowed when the input type is checkbox, date, datetime, datetime-local, e-mail, file, month, number, password, radio, search, tel, text, time, url, or week.

Any help or guidance would be appreciated :) Thanks!

1
You should insert the relevant code to your question instead of a link. Add the least amount of code that still makes sense and still produces the same error. - David

1 Answers

1
votes

The W3C validator had a bug (only for a few days), which got fixed in the meantime.

Your snippet does validate now.