Home > Guides > Core Developers Guide > Annotations > Validation Annotation |

Apache Struts 2 Documentation
Validation Annotation
Edit Page Browse Space Add Page Add News

This annotation has been deprecated since 2.1 as its previous purpose, to define classes that support annotation validations, is no longer necessary.

## Usage

The Validation annotation must be applied at Type level.

## Parameters

Parameter | Required | Default | Notes
--- | --- | --- | ---
validations | yes |  |

## Examples

An Annotated Interface

- Mark the interface with @Validation()
- Apply standard or custom annoations at method level

An Annotated Class

Icon

When multiple methods are used to map different actions on the same class, and one of them is annotated with @Validations, those validators will be triggered for all the actions, unless they are annotated with @SkipValidation or validateAnnotatedMethodOnly is set to true in the "validation" interceptor, like: