Annotation Type Validate
-
@Retention(RUNTIME) @Inherited @Target({FIELD,METHOD,ANNOTATION_TYPE}) public @interface Validate
Performs basic validations against the String representation of the value found in the annotated field. A validation failure will generate aDataValidationException
. By default, nulls and blanks are not allowed.Commonly used for java beans processed using
BeanProcessor
and/orBeanWriterProcessor
- See Also:
Conversion
,Conversions
,BeanProcessor
,BeanWriterProcessor
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
allowBlanks
Indicates whether this field can be blank (i.e.java.lang.String
matches
Ensures that the value of this field matches a given regular expression.java.lang.String[]
noneOf
Ensures that the value of this field does is not an unwanted value.boolean
nullable
Indicates whether this field can benull
java.lang.String[]
oneOf
Ensures that the value of this field is one of a given set of alternativesjava.lang.Class<? extends Validator>[]
validators
User provided implementations ofValidator
which will be executed in sequence after the validations specified in this annotation execute.
-