# Validate
Date: 2013-02-18

## org.simpleframework.xml.core
Annotation Type Validate

    @Retention(value=RUNTIME)
    public @interface Validate

The `Validate` annotation is used to mark a method in a serializable object that requires a callback from the persister once the deserialization completes. The validate method is invoked by the `Persister` after all fields have been assigned and before the commit method is invoked.

Typically the validate method is used to validate the fields that have been assigned once deserialization has been completed. The validate method must be a no argument public method or a method that takes a `Map` as the only argument. When invoked the object can determine whether the fields are valid, if the field values do not conform to the objects requirements then the method can throw an exception to terminate deserialization.

Author:
  Niall Gallagher
See Also:
  `Commit`