W3C home > Mailing lists > Public > www-validator@w3.org > October 2004

Re: No error about missing enctype="multipart/form-data" with input type="file"

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 19 Oct 2004 15:24:52 +0300 (EEST)
To: Jan Willem Knopper <jwk@stack.nl>
Cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0410191520320.12052@korppi.cs.tut.fi>

On Tue, 19 Oct 2004, Jan Willem Knopper wrote:

> In a form I used an input type="file" (inside a table). The form lacked
> the enctype="multipart/form-data".

It is somewhat debatable whether that's against the specifications.
In practical terms, you should surely use that enctype for a form that
contains a file input field.

But it surely doesn't violate any _formalized_ requirement in the HTML
specification.

> I got no errormessage from the validator.

That's unavoidable, since the mistake is not a reportable markup error.
Your markup does not violate the formal rules in the DTD, which is all
that the validator knows, basically.

It even _could not_ be a reportable markup error. In SGML (and still less
in XML) you cannot express, in a DTD, a requirement that an attribute must
be present if a certain other attribute is present - still less that an
attribute with a specific value must be present depending on the value of
another attribute. If an attribute is made REQUIRED, then it is
unconditionally required.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 19 October 2004 12:26:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:15 GMT