This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28354 - Placeholder on inputs with type="email" wrongly being flagged as invalid.
Summary: Placeholder on inputs with type="email" wrongly being flagged as invalid.
Status: RESOLVED DUPLICATE of bug 28362
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-27 13:09 UTC by Phil Ellett
Modified: 2015-08-23 07:07 UTC (History)
5 users (show)

See Also:


Attachments

Description Phil Ellett 2015-03-27 13:09:11 UTC
The following error messages :-

"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."

Are incorrect for the following markup.

<input id="email" name="email" class="form-control" placeholder="Enter Email" type="email" required>

The correct type is "email" and NOT "e-mail" as confirmed by MDN documentation.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input

Please advise.
Comment 1 ratliff33 2015-03-27 17:00:44 UTC
Yes, I also noticed this issue today...  placeholder is allowed on type="email"
Comment 2 omar.crea 2015-03-27 19:21:30 UTC
Same for the "maxlength" attribute.
Comment 3 Alexey Smolianinov 2015-03-28 08:54:21 UTC
Same for "required" and "pattern" attributes:

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.
    <input type="email" required pattern="@">

Attribute pattern is only allowed when the input type is e-mail, password, search, tel, text, or url.
    <input type="email" required pattern="@">
Comment 4 wendt.withers 2015-03-29 23:56:01 UTC
Same as bug 28362

*** This bug has been marked as a duplicate of bug 28362 ***
Comment 5 Phil Ellett 2015-03-30 02:39:01 UTC
Why is the bug I posted marked as being a duplicate of a bug posted more than 24 hours later!!!!.
Comment 6 Michael[tm] Smith 2015-03-30 08:53:45 UTC
(In reply to omar.crea from comment #2)
> Same for the "maxlength" attribute.

(In reply to Alexey Smolianinov from comment #3)
> Same for "required" and "pattern" attributes:
> 
> 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.
>     <input type="email" required pattern="@">
> 
> Attribute pattern is only allowed when the input type is e-mail, password,
> search, tel, text, or url.
>     <input type="email" required pattern="@">

All caused by the same bug, all now fixed.

(In reply to Phil Ellett from comment #5)
> Why is the bug I posted marked as being a duplicate of a bug posted more
> than 24 hours later!!!!.

Dunno but thanks for taking time to report it originally.