Grails 3.3.1 - Register new constraint

Viewed 371

In previous versions of Grails, I could call:

grails.validation.ConstrainedProperty.registerNewConstraint(
                constraintName,
                constraintClass)

But now grails.validation.ConstrainedProperty is deprecated, and the class to use instead, grails.gorm.validation.ConstrainedProperty, does not have the method registerNewConstraint.

How can I register a new constraint in Grails 3.3.1?

1 Answers
Related