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?
Since grails 3.3.x you can't register constraints with the ConstraintedProperty the package doesn't matter. You should use the ConstraintRegistry. See the part Grails Validator and ConstrainedProperty API Deprecated of grails documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With