Field errors
The default behaviour of the reporting extension is to display all error
messages for each field, before the label and input
elements. The error messages are added as an unordered list with the class
name messages. This class name can be configured through
messagesClass, see configuring reporting
for more info on how this works.
HTML example
Given the following HTML for a field:
Should this field fail, the following HTML would be generated:
Should you want to display several messages for a single field, then the
ul would just have more li's.
Example
The following example shows the default error reporting. Try to submit an
empty form and use a DOM inspector to see how the HTML is altered. A little
bit of CSS is added to make the text inside the failing divs
red, and a brighter background to make it stand out.
Next: Fiedset/div errors | Back to Reporting extension features index