0

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. Commented Mar 28, 2015 at 1:18

1 Answer 1

1

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

Your snippet does validate now.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you!! It was driving me crazy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.