@Trait @CompileStatic trait GormValidateable extends Object
A trait that adds GORM validation behavior to any class
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
clearErrors()Clears any errors that exist on an instance |
|
Errors |
getErrors()Obtains the errors for an instance |
|
Boolean |
hasErrors()Tests whether an instance has any errors |
|
boolean |
shouldSkipValidation()
|
|
void |
skipValidation(boolean shouldSkip)Marks this instance to skip validation |
|
boolean |
validate(Map arguments)Validates an instance for the given arguments |
|
boolean |
validate(List fields)Validates an instance |
|
boolean |
validate()Validates an instance |
Clears any errors that exist on 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