@groovy.transform.Trait @groovy.transform.CompileStatic trait GormValidateable extends java.lang.Object
A trait that adds GORM validation behavior to any class
Modifiers | Name | Description |
---|---|---|
private org.springframework.validation.Errors |
errors |
The validation errors object |
private boolean |
skipValidate |
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 |
|
private GormValidationApi |
currentGormValidationApi() Used to obtain the GormValidationApi 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
The validation errors object
Clears any errors that exist on an instance
Used to obtain the GormValidationApi instance. This method is used internally by the framework and SHOULD NOT be called by the developer
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