@groovy.transform.Trait @groovy.transform.CompileStatic trait Validateable extends java.lang.Object
A trait that can be applied to make any object Validateable
| Type Params | Return Type | Name and description |
|---|---|---|
|
static void |
clearConstraintsMapCache()Clears the cached constraints map, forcing re-evaluation on next access. |
|
void |
clearErrors()Clear the errors |
|
static boolean |
defaultNullable() |
|
static java.util.Map<java.lang.String, Constrained> |
getConstraintsMap()
|
|
Errors |
getErrors()
|
|
java.lang.Boolean |
hasErrors()
|
|
void |
setErrors(Errors errors) |
|
boolean |
validate()Validate the object |
|
boolean |
validate(groovy.lang.Closure<?>[] adHocConstraintsClosures)Validate the object with the given adhoc constraints |
|
boolean |
validate(java.util.Map<java.lang.String, java.lang.Object> params)Validate the object with the given parameters |
|
boolean |
validate(java.util.Map<java.lang.String, java.lang.Object> params, groovy.lang.Closure<?>[] adHocConstraintsClosures)Validate the object with the given parameters and adhoc constraints |
|
boolean |
validate(java.util.List fieldsToValidate)Validate the object for the given list of fields |
|
boolean |
validate(java.util.List fieldsToValidate, groovy.lang.Closure<?>[] adHocConstraintsClosures)Validate the object for the given list of fields and adhoc constraints |
|
boolean |
validate(java.util.List fieldsToValidate, java.util.Map<java.lang.String, java.lang.Object> params)Validate the object for the given list of fields and parameters |
|
boolean |
validate(java.util.List fieldsToValidate, java.util.Map<java.lang.String, java.lang.Object> params, groovy.lang.Closure<?>[] adHocConstraintsClosures)Validate the object for the given list of fields, parameters and adhoc constraints |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Clears the cached constraints map, forcing re-evaluation on next access. This is useful in testing scenarios to prevent test environment pollution where shared constraints may need to be re-evaluated after configuration changes.
Clear the errors
Validate the object
Validate the object with the given adhoc constraints
Validate the object with the given parameters
Validate the object with the given parameters and adhoc constraints
Validate the object for the given list of fields
Validate the object for the given list of fields and adhoc constraints
Validate the object for the given list of fields and parameters
Validate the object for the given list of fields, parameters and adhoc constraints