(Quick Reference)

fieldError

Purpose

Renders an error message for the given bean and field.

Examples

<g:fieldError bean="${book}" field="title" />

Description

Attributes

  • bean (required) - The bean to check for errors
  • field (required) - The field of the bean or model reference to checkreferes to field of defined bean
  • message (optional) -The object to resolve the message for. Objects must implement org.springframework.context.MessageSourceResolvable.
  • encodeAs (optional) - The name of a codec to apply, i.e. HTML, JavaScript, URL etc.
  • locale (optional) - override locale to use instead of the one detected.

Source