Please explain this warning

Post here if your topic is about CSE HTML Validator but doesn't fit in another forum.

Please explain this warning

Postby mar961 » Thu Mar 17, 2005 4:27 am

I'm currently working with CSE HTML Validator 7 beta 2 (v.6.9920), and in a page (XHTML 1.0 Strict) with a filefield in which are set the "size" and "maxlength" attributes I get this Warning message:

You should only use the "maxlength" and "size" attributes with the "input" element when the "type" attribute specifies a text field. For example, when "type=text" or "type=password".

I have serched on the web for further references to this issue, but I have found nothing.
Please could you explain (or give a reference URL) about the above mentioned Warning, and how it applies to input=type"file"?

TIA
Marcello Cerruti
mar961
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Thu Mar 17, 2005 4:10 am

Re: Please explain this warning

Postby Albert Wiersch » Thu Mar 17, 2005 10:40 am

mar961 wrote:I have serched on the web for further references to this issue, but I have found nothing.
Please could you explain (or give a reference URL) about the above mentioned Warning, and how it applies to input=type"file"?


Hello,

Here is a link to the specification:
http://www.w3.org/TR/html401/interact/f ... edef-INPUT

It implies that the "size" and "maxlength" attributes are only used for the "input" element when type="text" or type="password".

I did some testing and when type="file", it seems that the "size" attribute works but "maxlength" doesn't (it's ignored by IE and Firefox). I will make the changes for the next BETA. Please ignore that messages for now or you can disable it or change its type by right-clicking on it in CSE's editor. Thank you!
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby mar961 » Thu Mar 17, 2005 2:29 pm

Here is a link to the specification:
http://www.w3.org/TR/html401/interact/f ... edef-INPUT

It implies that the "size" and "maxlength" attributes are only used for the "input" element when type="text" or type="password".


I see, though before writing the post I have checked the W3C reference, and it didn't seem to me that it implies to use the attributes "size" and "maxlenght" only when the "type" attribute has the value set to "text" or "password".
It seems to me that W3C just warns that the numeric value of "size" should mean number character for "text" and "password", and number pixel in all the other cases (included the hybrid case of type="file", which is composed by a text field and a button). W3C also mention the need of the current behavior that allows scrolling mechanism when the maximum number of characters exceeds the specified size.
So I can't understand why it should be implied to use the attributes "size" and "maxlenght only when the "type" attribute has the value set to "text" or "password".
Am I missing something?

TIA

Marcello Cerruti
mar961
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Thu Mar 17, 2005 4:10 am

Postby Albert Wiersch » Thu Mar 17, 2005 2:56 pm

Hello,

I've changed it so that the "size" attribute can be used when type="file". When the "maxlength" attribute is used with type="file", it will generate this warning:
The "maxlength" attribute may have no effect with the "input" element when "type=file". For example, IE 6.0 and Firefox 1.0 are not affected. They do not limit the length of the filename.

I think the above changes should take care of this issue. The changes were made in the v7.0 config file which I can make available if you'd like and are using v7.0 BETA. If you have any suggestions to change or improve this, then please let me know.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby mar961 » Fri Mar 18, 2005 1:43 am

I think the above changes should take care of this issue. The changes were made in the v7.0 config file which I can make available if you'd like and are using v7.0 BETA. If you have any suggestions to change or improve this, then please let me know.


Sure, I hope to give you more feedback in the future, though this is a very busy period ...as usual :cry: In the company where I work we are releasing just now a very complex web application.

BTW I'll try to give you as much feedback as I can, I just owe you it :wink:
As you can see from your records I am a long time CSE customer, and CSE has helped me a lot trhough all these years.

Thanks

Marcello cerruti
mar961
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Thu Mar 17, 2005 4:10 am


Return to Other CSE HTML Validator

Who is online

Users browsing this forum: No registered users and 3 guests