nullable

Purpose

Allows a property to be set to null. By default Grails does not allow null values for properties.

Examples

age(nullable:true)

Description

Set to true if the property allows null values. This constraint influences schema generation.

An empty form field will appear in the request parameters as an empty string, not as null. Keep this in mind when setting domain fields directly form request parameters

Error Code: className.propertyName.nullable