2

It would appear that Command Objects in grails lack the beforeValidate method that domain classes have?

I'm not quite sure why this is or if I'm missing something?

I've several command classes where i'd like to do some whitespace trimming etc before validation so that I can easily use some of the standard validation constraints rather than having to create custom validators to do this task.

Is there an accepted best way to do this?

crebbo
  • 305
  • 3
  • 8

1 Answers1

-3

See: https://github.com/grails/grails-core/issues/3895

I guess that they duplicate the implementation... Sure, it's grails, they don't have a good quality assurance... (It might have been better to use the validation API of Java-EE (javax.validation))

Lifeweaver
  • 986
  • 8
  • 29