(Quick Reference)

hasErrors

Purpose

Check if a controller has errors associated with it.

Examples

class DemoController {

def generateReport(int size) { if(hasErrors()) { errors.allErrors.each { println it } } } }

See errors.