Validateable (Grails 6.0.0)

Package: grails.validation

## [Groovy] Trait Validateable

- grails.validation.Validateable

-     @groovy.transform.Trait
      @groovy.transform.CompileStatic
      trait Validateable
      extends java.lang.Object

  A trait that can be applied to make any object Validateable

  Since:
    3.0
  Authors:
    Jeff Brown
    Graeme Rocher

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private org.grails.datastore.gorm.support.BeforeValidateHelper` | `beforeValidateHelper` |
    `private static java.util.Map<java.lang.String, Constrained>` | `constraintsMapInternal` |
    `private org.springframework.validation.Errors` | `errors` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `org.springframework.validation.Errors` | `errors`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `clearErrors()` Clear the errors
    `` | `static boolean` | `defaultNullable()`
    `` | `private ValidationErrors` | `doValidate(ConstrainedProperty> constraints, java.util.List fieldsToValidate)`
    `` | `private static org.grails.datastore.gorm.validation.constraints.eval.ConstraintsEvaluator` | `findConstraintsEvaluator()`
    `` | `private org.springframework.context.MessageSource` | `findMessageSource()`
    `` | `static java.util.Map<java.lang.String, Constrained>` | `getConstraintsMap()` Returns: The map of applied constraints
    `` | `org.springframework.validation.Errors` | `getErrors()` Returns: The errors
    `` | `private java.lang.Object` | `getPropertyValue(grails.gorm.validation.ConstrainedProperty prop)`
    `` | `java.lang.Boolean` | `hasErrors()` Returns: Whether the object has errors
    `` | `private void` | `initErrors()`
    `` | `void` | `setErrors(org.springframework.validation.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

  - ### Inherited Methods Summary

    Inherited Methods
    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()`

- - ### Field Detail

    - #### private org.grails.datastore.gorm.support.BeforeValidateHelper beforeValidateHelper

    - #### private static java.util.Map<java.lang.String, Constrained> constraintsMapInternal

    - #### private org.springframework.validation.Errors errors

  - ### Property Detail

    - #### org.springframework.validation.Errors errors

  - ### Method Detail

    - #### @groovy.transform.Generated void clearErrors()

      Clear the errors

    - #### @groovy.transform.Generated static boolean defaultNullable()

    - #### private ValidationErrors doValidate(ConstrainedProperty> constraints, java.util.List fieldsToValidate)

    - #### @groovy.transform.CompileStatic private static org.grails.datastore.gorm.validation.constraints.eval.ConstraintsEvaluator findConstraintsEvaluator()

    - #### private org.springframework.context.MessageSource findMessageSource()

    - #### @groovy.transform.Generated static java.util.Map<java.lang.String, Constrained> getConstraintsMap()

      Returns:
        The map of applied constraints

    - #### @groovy.transform.Generated org.springframework.validation.Errors getErrors()

      Returns:
        The errors

    - #### @groovy.transform.CompileDynamic private java.lang.Object getPropertyValue(grails.gorm.validation.ConstrainedProperty prop)

    - #### @groovy.transform.Generated java.lang.Boolean hasErrors()

      Returns:
        Whether the object has errors

    - #### private void initErrors()

    - #### @groovy.transform.Generated void setErrors(org.springframework.validation.Errors errors)

    - #### @groovy.transform.Generated boolean validate()

      Validate the object

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated boolean validate(groovy.lang.Closure<?>[] adHocConstraintsClosures)

      Validate the object with the given adhoc constraints

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated boolean validate(java.util.Map<java.lang.String, java.lang.Object> params)

      Validate the object with the given parameters

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated 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

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated boolean validate(java.util.List fieldsToValidate)

      Validate the object for the given list of fields

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated boolean validate(java.util.List fieldsToValidate, groovy.lang.Closure<?>[] adHocConstraintsClosures)

      Validate the object for the given list of fields and adhoc constraints

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated 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

      Returns:
        True if it is valid

    - #### @groovy.transform.Generated 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

      Returns:
        True if it is valid