@groovy.transform.Trait @groovy.transform.CompileStatic trait GormValidateable extends java.lang.Object
A trait that adds GORM validation behavior to any class
Type | Name and description |
---|---|
org.springframework.validation.Errors |
errors The validation errors object |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clearErrors() Clears any errors that exist on an instance |
|
org.springframework.validation.Errors |
getErrors() Obtains the errors for an instance |
|
java.lang.Boolean |
hasErrors() Tests whether an instance has any errors |
|
boolean |
shouldSkipValidation()
|
|
void |
skipValidation(boolean shouldSkip) Marks this instance to skip validation |
|
boolean |
validate(java.util.Map arguments) Validates an instance for the given arguments |
|
boolean |
validate(java.util.List fields) Validates an instance |
|
boolean |
validate() Validates an instance |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The validation errors object
Clears any errors that exist on an instance
Obtains the errors for an instance
Tests whether an instance has any errors
Marks this instance to skip validation
shouldSkip
- True if validation should be skippedValidates an instance for the given arguments
arguments
- The arguments to useValidates an instance
fields
- The list of fields to validateValidates an instance