onStartTagCantUseHere()

This function is called when a start tag is encountered where the configuration does not allow it to be used and an error message is about to be generated. This functions allows for changing and/or improving the error message.

$ostcuh_msg - the main message text (can be changed)

$ostcuh_msgappend - the message text to append to the main message (can be changed)

$ostcuh_msgid - the message ID of the message that is being generated; the default is -1 (can be changed)

$ostcuh_msgtype - the message type of the message that is being generated; the default is MSG_ERROR (can be changed)

$ostcuh_tagname - the name of the start tag (read only)

This function is supported by CSS HTML Validator v17.0107 and later.

Example 1:

function onStartTagCantUseHere() {
 if $ostcuh_tagname=='legend' {
  $ostcuh_msgappend='This element can only be used as the first child of a "fieldset" element.';
  $ostcuh_msgid=2017021500;
 }
}