@Retention(value=RUNTIME) @Inherited @Target(value={FIELD,METHOD,ANNOTATION_TYPE}) public @interface Validate
DataValidationException
.
By default, nulls and blanks are not allowed.
Commonly used for java beans processed using BeanProcessor
and/or BeanWriterProcessor
Conversion
,
Conversions
,
BeanProcessor
,
BeanWriterProcessor
Modifier and Type | Optional Element and Description |
---|---|
boolean |
allowBlanks
Indicates whether this field can be blank (i.e.
|
String |
matches
Ensures that the value of this field matches a given regular expression.
|
String[] |
noneOf
Ensures that the value of this field does is not an unwanted value.
|
boolean |
nullable
Indicates whether this field can be
null |
String[] |
oneOf
Ensures that the value of this field is one of a given set of alternatives
|
Class<? extends Validator>[] |
validators
User provided implementations of
Validator which will be executed
in sequence after the validations specified in this annotation execute. |
public abstract boolean nullable
null
true
true if nulls are allowed, false
otherwisepublic abstract boolean allowBlanks
<= ' '
true
true if blanks are allowed, false
otherwisepublic abstract String matches
public abstract String[] oneOf
public abstract String[] noneOf
public abstract Class<? extends Validator>[] validators
Validator
which will be executed
in sequence after the validations specified in this annotation execute.Copyright © 2024 Univocity Software Pty Ltd. All rights reserved.