W3C home > Mailing lists > Public > www-validator@w3.org > December 2016

Re: Bug-reporting placeholder attribute not valid for input type=tel

From: Michael[tm] Smith <mike@w3.org>
Date: Tue, 27 Dec 2016 20:12:20 +0900
To: John Skowronski <johnskowronski3@verizon.net>
Cc: www-validator@w3.org
Message-ID: <20161227111220.khmoeome5nixbad5@sideshowbarker.net>
John Skowronski <johnskowronski3@verizon.net>, 2016-12-26 16:51 -0500:
> Archived-At: <http://www.w3.org/mid/4ACDD8E1-F238-44F0-99F3-AA98640B9275@verizon.net>
> 
> I received the following error message:
> 
> Error: Attribute placeholder is only allowed when the input type is email, number, password, password, search, search, or text.
> From line 173, column 7; to line 173, column 182
> el>↩						<input type="tel" class="inputField" id="phone" name="phone" value="" placeholder="(123) 456-7890" pattern="^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$" maxlength="20">↩					

I can’t reproduce that error with that markup and I can’t understand why it
would ever happen.

The part of the source code that controls the behavior for this is here:

  https://github.com/validator/validator/blob/master/src/nu/validator/checker/schematronequiv/Assertions.java#L142

And that code maps “placeholder” to a set of type values that includes “tel”.

Also if I make a minimal document that includes the input element above,
the checker does not report any error for it: https://goo.gl/XNBH7V

So if you have a document that reliably reproduces that error, I hope you
can share it with me so that I can try to troubleshoot it and find what’s
going on.

There’s something wrong with the error message itself there, in that it
repeats “password” and “search”. That, even just on its own, indicates
unexpected behavior.

  —Mike

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Tuesday, 27 December 2016 11:12:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 27 December 2016 11:12:53 UTC