I want to add a date expression validator in my command object, but I’m not sure what’s the correct syntax…
class UserController {
…
}
class DateServiceCommand {
String date //valid format is DD-MMM-YYYY, 01-APR-2011
static constraints = {
date(blank:false, ??? )
}
}
You can use a custom validator: