[html5] Is html5.validator.nu wrong about <input>

Prof. T.D. Wilson wilsontd at gmail.com
Tue Apr 10 03:59:54 PDT 2012


Thanks for the fast response.  In fact, the code isn't mine, but part of a
Google search box, which I use at the end of papers published in the
journal (e.g., http://informationr.net/ir/17-1/paper509.html) - why they
specify the input as 'hidden' is a mystery to me :-)  I'll try changing it
and see what happens.  Thanks for the useful link to the table.

On 10 April 2012 11:23, Smylers <Smylers at stripey.com> wrote:

> Prof. T.D. Wilson writes:
>
> > *Error*: Attribute maxlength not allowed on element
> > input<
> http://www.whatwg.org/specs/web-apps/current-work/#the-input-element>
> > at this point.
> >
> > From line 342, column 2; to line 342, column 206
> >
> > ht:32;">↩ *<input type="hidden" name="q" maxlength="255" ...
>
> What are you intending the maxlength attribute to do on a hidden
> <input>?
>
> > However, all the information I can find about both 'maxlength' and
> > 'size' (which is also rejected in the same way) tells me that both are
> > permitted in html5. Is the validator wrong on this?
>
> Note the validator says "at this point", not that they are invalid on
> all <input> elements.
>
> This table in the HTML5 spec shows which of <input>'s many attributes,
> including maxlength, can be used when:
> http://developers.whatwg.org/the-input-element.html#input-type-attr-summary
>
> Note that XHTML1 (via HTML4) only defines maxlength for <input> elements
> with type="text" or "password", so this probably should've been picked
> up as a problem in your XHTML1, too.
>
> Cheers
>
> Smylers
> --
> http://twitter.com/Smylers2
> _______________________________________________
> Help mailing list
> Help at lists.whatwg.org
> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
>



-- 
----------------------------------------------------------------------
Professor T.D. Wilson, PhD, Hed.Dr, PhD (h.c.)
----------------------------------------------------------------------
Publisher and Editor in Chief: Information Research:
an international electronic journal
Website - http://InformationR.net/ir/ <http://informationr.net/ir/>

Blog - http://info-research.blogspot.com/
Photoblog - http://tomwilson.shutterchance.com/
----------------------------------------------------------------------|
E-mail: wilsontd at gmail.com
----------------------------------------------------------------------|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20120410/b285c4c5/attachment-0003.htm>


More information about the Help mailing list