Validateable (Grails 3.2.4)
Date: 2016-12-21

Package: grails.validation

## [Groovy] Trait Validateable

- grails.validation.Validateable

- A trait that can be applied to make any object Validateable

  Authors:
    Jeff Brown
    Graeme Rocher
  Since:
    3.0

- - ### Properties Summary

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

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `clearErrors()` Clear the errors
    `static boolean` | `defaultNullable()`
    `static java.util.Map<java.lang.String, ConstrainedProperty>` | `getConstraintsMap()` @return The map of applied constraints
    `org.springframework.validation.Errors` | `getErrors()` @return The errors
    `java.lang.Boolean` | `hasErrors()` @return Whether the object has 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

- - ### Property Detail

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

  - ### Method Detail

    - #### void clearErrors()

      Clear the errors

    - #### static boolean defaultNullable()

    - #### static java.util.Map<java.lang.String, ConstrainedProperty> getConstraintsMap()

      Returns:
        The map of applied constraints

    - #### org.springframework.validation.Errors getErrors()

      Returns:
        The errors

    - #### java.lang.Boolean hasErrors()

      Returns:
        Whether the object has errors

    - #### boolean validate()

      Validate the object

      Returns:
        True if it is valid

    - #### boolean validate(groovy.lang.Closure<?>... adHocConstraintsClosures)

      Validate the object with the given adhoc constraints

      Returns:
        True if it is valid

    - #### 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

    - #### 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

    - #### boolean validate(java.util.List fieldsToValidate)

      Validate the object for the given list of fields

      Returns:
        True if it is valid

    - #### 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

    - #### 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

    - #### 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