class User {
String userName
static constraints = {
userName nullable:false
}
}
*** I tried the different combination of the following in the message.properties ***
User.userName.null.message=The User Name cannot be null/blank
User.userName.null=The User Name cannot be null/blank
[package].User.userName.null.message=The User Name cannot be null/blank
[package].User.userName.null=The User Name cannot be null/blank
Но все равно не повезло. Я все еще получаю сообщение об ошибке по умолчанию: «Свойство [userName] clas [package_name] не может быть нулевым. Я использую Grails 3.0.8.
User.userName.nullable=The User Name cannot be null/blank
- person Emmanuel Rosa   schedule 09.03.2016