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

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

From: John Skowronski <johnskowronski3@verizon.net>
Date: Mon, 26 Dec 2016 16:51:03 -0500
Message-id: <4ACDD8E1-F238-44F0-99F3-AA98640B9275@verizon.net>
To: www-validator@w3.org
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">↩					
According to: http://w3c.github.io/html/sec-forms.html#telephone-state-typetel, Section Telephone State (type=tel) / Bookkeeping details, the placeholder attribute IS in fact allowed on type=tel:

“The following common input element content attributes, IDL attributes, and methods apply to the element: autocomplete,list, maxlength, minlength, pattern, placeholder, readonly, required, and size content attributes; list,selectionStart, selectionEnd, selectionDirection, and value IDL attributes; select(), setRangeText(), andsetSelectionRange() methods.”
Received on Tuesday, 27 December 2016 08:29:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 27 December 2016 08:30:01 UTC