org.japano.metadata.annotation
Annotation Type JapanoValidation


@Target(value=METHOD)
@Documented
@Retention(value=SOURCE)
public @interface JapanoValidation

Can be used on action parameters and fields to specify which values are valid for that parameter or field. One element has to be defined.

Version:
$Id: JapanoValidation.java,v 1.6 2005/09/27 21:30:51 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )

Optional Element Summary
 java.lang.String custom
          Full class name of a Validator implementation.
 java.lang.String errorMessage
          Error message to display in case of a validation failure.
 int[] limit
          An array containing lower and upper limit.
 java.lang.String regex
          Regular Expression to match the value against.
 boolean required
          If true the value must be present to be valid.
 java.lang.String requiredMessage
          Error message to display when the validated value is required but not present.
 

limit

public abstract int[] limit
An array containing lower and upper limit. Either limit, regex or custom must be given.

Default:
{}

regex

public abstract java.lang.String regex
Regular Expression to match the value against. Either limit, regex or custom must be given.

Default:
"[unset]"

custom

public abstract java.lang.String custom
Full class name of a Validator implementation. Either limit, regex or custom must be given.

Default:
"[unset]"

errorMessage

public abstract java.lang.String errorMessage
Error message to display in case of a validation failure.

Default:
"[unset]"

required

public abstract boolean required
If true the value must be present to be valid.

Default:
false

requiredMessage

public abstract java.lang.String requiredMessage
Error message to display when the validated value is required but not present.

Default:
"[unset]"