Wednesday, November 3, 2010

Get Domain Class's Error Message in Grails Controller

The following code snippet can be used to get domain class's error messages in Grails (1.2.2) Controller:-


def errMsgList = domainClassObj.errors.allErrors.collect{g.message([error : it])}

1 comment: