I am using jQuery validation plugin and placed the error placeholder according to design needs. Used following code:
<label for="fav[]" class="error" generated="true"></label>
<input id="field-11" name="fav[]" value="252483" type="checkbox">
<input id="field-12" name="fav[]" value="252484" type="checkbox">
But client complained that the markup is not valid. Following are the errors:
Attribute generated not allowed on element label at this point.
The for attribute of the label element must refer to a form control.
I am using HTML 5. I know in html 5 we can use custom attributes by data-{attribute}. But as generated is a jquery validation plugin attribute, we can't append data- to it.
So, anyone know how to fix the above w3 validation errors? Your help is really appreciated.
generatedattribute.