I need to write a class class constraint in Grails that says that one integer field must be greater than or equal to another.
When I write the code as follows:
class MyDomain {
String title
int valueMin = 1
int valueMax = 1
static constraints = {
valueMin(min:1)
valueMax(min:valueMin)
}
}
I get an error message:
Caused by: groovy.lang.MissingPropertyException: No such property: valueMin for class: MyDomain
Any idea please?
source
share