Feras Odeh
Feras Odeh

Reputation: 9296

Override constraints error message not working in Grails

I'm trying to override grails default error message for minSize constraint but I always get the default message. I wrote the following code in my message.properties file

Student.firstName.invalid.min.size.message

I also tried to use the full package name but still with no luck. Is there anybody can help me with that?

Thanks,

Upvotes: 0

Views: 873

Answers (1)

Ian Roberts
Ian Roberts

Reputation: 122364

The correct message code to use is specified at the bottom of the reference page for each constraint in the grails user guide. In the case of minSize you need

className.propertyName.minSize.notmet

Upvotes: 2

Related Questions