Is there a way to manipulate Domain object after the validation is completed in Grails ?
I have to encode the password before inserting to database, but i want to do it only after the validation is completed.
Thanks.
For me, what you validate in your gorm object should be what you save. If you want to validate an unencoded password then I suggest you create a command object with suitable constraints on the password and validate that. If the command object passes validation, encode the password and add it to the gorm object you want to insert/update.
This way the gorm object only ever sees encoded passwords and here you should just validate that is not empty (or looks like a hex encoded password).