Embarrassing mistake - and CSE didn't help

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
MBaas
Rank I - Novice
Posts: 11
Joined: Thu Feb 11, 2016 7:31 am

Embarrassing mistake - and CSE didn't help

Post by MBaas »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Embarrassing mistake - and CSE didn't help

Post by Albert Wiersch »

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?
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
MBaas
Rank I - Novice
Posts: 11
Joined: Thu Feb 11, 2016 7:31 am

Re: Embarrassing mistake - and CSE didn't help

Post by MBaas »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Embarrassing mistake - and CSE didn't help

Post by Albert Wiersch »

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).
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
MBaas
Rank I - Novice
Posts: 11
Joined: Thu Feb 11, 2016 7:31 am

Re: Embarrassing mistake - and CSE didn't help

Post by MBaas »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Embarrassing mistake - and CSE didn't help

Post by Albert Wiersch »

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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial