Embarrassing mistake - and CSE didn't help

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
MBaas
Rank I - Novice
Rank I - Novice
Posts: 11
Joined: Thu Feb 11, 2016 7:31 am

Embarrassing mistake - and CSE didn't help

Post by MBaas » Fri Feb 12, 2016 3:18 am

It's been some time since I last coded "raw" HTML - and so there were a few errors in my page which the validator identified and I was happy my HTML validated. Yet the next surprise came yesterday when I submitted a form and only one of 3 fields arrived at the server. Analyzing the request in the browser, I saw that one field only was sent.
And it took me painfully long to find out that I had forgotten about the name-attribute of the input-elements.

So...I would like to suggest to add a warning for missing name-attributes of input-controls... :-)

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Embarrassing mistake - and CSE didn't help

Post by Albert Wiersch » Fri Feb 12, 2016 10:49 am

That's strange... CSE HTML Validator should generate a warning like this:

An "input" element with type="radio" should normally have both the "name" and "value" attributes even though this is not technically required by the HTML/XHTML specification. This message is displayed up to 5 times.

Can you send me a small sample document that reproduces this problem?
Image
Albert Wiersch

MBaas
Rank I - Novice
Rank I - Novice
Posts: 11
Joined: Thu Feb 11, 2016 7:31 am

Re: Embarrassing mistake - and CSE didn't help

Post by MBaas » Sat Feb 13, 2016 12:33 am

Cool - you already thought about it :-)

This did not produce the message you've shown with V16: (Validator Engine Options > Flags: all enabled)

Code: Select all

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input type="text" id="foo1">
<textarea cols="3" id="foo2"></textarea>
</body>
</html>

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Embarrassing mistake - and CSE didn't help

Post by Albert Wiersch » Mon Feb 15, 2016 9:48 am

Thanks. Some missing "name" attribute messages are only generated when a control is in a form to reduce the likelihood of undesirable (and not helpful) warnings, which is why you are not seeing the warning for that input control.

As for the textarea, you won't see a warning for that even if it's in a "form" element. I'll add a warning for no "name" attribute with "textarea" for the next update (if used in a form).
Image
Albert Wiersch

MBaas
Rank I - Novice
Rank I - Novice
Posts: 11
Joined: Thu Feb 11, 2016 7:31 am

Re: Embarrassing mistake - and CSE didn't help

Post by MBaas » Wed Feb 17, 2016 2:53 am

Oh sorry, the <form> disappeared when I tried to slim down the thing to build the minimal repro - but that was too much ;-)
You're right, it then creates a warning for the input - somehow I totally missed that/did not pay attention to the "Warnings"-tab.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Embarrassing mistake - and CSE didn't help

Post by Albert Wiersch » Wed Feb 17, 2016 11:26 am

No problem. :) I'm glad this issue is resolved. While looking into it I was also able to improve some related checks and messages.

If you run across any other issues where you think CSE HTML Validator should be more helpful then please let me know. I depend on user feedback to make the program as useful and helpful as possible.
Image
Albert Wiersch

Post Reply