I have a domain class :
package x
class User {
transient springSecurityService
String username
String password
//other stuffs.
static constraints = {
username blank: false, unique: true
password blank: false
email blank: false, email:true
}
}
This is the class that I used for Spring security. In my /register/index
page I need custom error messages, so I added these lines into message.properties
:
x.User.username.unique=Username already exists. Please use other username.
But that doesn't seem to be working. I get only this error message :
Property [{0}] of class [{1}] cannot be null
Even though I pass some value into my username
column I still get this error message. I'm confused with it. How this /register/index
comes from?
Where I need to change the error message?
Thanks in advance.