The validation provided by Grails is just a wrapper around the Spring bean of the validation framework. Since Grails is open source, you can see how to do it and adapt it to your needs. The best place to look is GrailsDomainClassValidator and DomainClassGrailsPlugin to understand how this is done. Another interesting topic is the @Validateable annotation .
As far as I know, and from what I see in the source, there is no single way to do this outside of the Grails project without writing your own adaptation / implementation.
source
share