According to https://docs.grails.org/latest/ref/Constraints/Usage.html,, we can especify constraints using the following construction:
login size: 5..15, blank: false, unique: true.
However, if a anottate the class in which this constraint is applied with '@groovy.transform.CompileStatic', I receive the following compile error:
- Cannot find matching method demomt.Plan#login(java.util.LinkedHashMap <java.l
ang.String, java.lang.Object>). Please check if the declared type is right and i
f the method exists.
To fix the problem I need to change the declaration of the constraint to the following:
login: [ size: 5..15, blank: false, unique: true ]
I don't know if the documentation is wrong, if there is some problem with the compiler or if I am doing something wrong.
Thanks.
Thanks Jeff. Working perfectly.