Page 1 of 1

Error Message for Select Option

Posted: Thu May 15, 2014 2:21 pm
by rayt435
I have many web pages that are dynamically built on the server with the resulting form processed on the server. Part of the requirements of the applications are for select boxes with an empty selection element. This indicates to the code on the server that nothing was selected for that item, such as a state code, and that is perfectly valid.

The latest version of the HTML validator, Version 14.03, now flags these empty select options as invalid. This is apparently new with the latest version. "The "option" element must contain non-whitespace text when it has no "label" attribute. Add the "label" attribute or ensure that this element contains non-whitespace text."

Adding a label to the entry is not the solution as that gets passed as part of the form fields. I really need to have an empty form element passed. Putting spaces in the fields produces the same error message.

What I would like is an option to turn off this error checking. Or put the error checking back as it was before with nothing more than a warning.

Re: Error Message for Select Option

Posted: Thu May 15, 2014 3:06 pm
by Albert Wiersch
Hello,

You can disable this check by right-clicking on the message in CSE HTML Validator's editor when the message is shown in the Results Window. From the context menu that appears, choose Message Options->Disable using Message ID. Alternatively you can change the message type to a warning or just a regular message. CSE HTML Validator is designed to be very user configurable.

I hope this helps. Please let me know if you have any more questions.

Re: Error Message for Select Option

Posted: Fri May 16, 2014 10:27 am
by rayt435
Ah, I see. Thanks. I did not know that you could right click on the message. I had checked in the options and found no setting. Well done sir.