@Target(value=METHOD) @Retention(value=RUNTIME) public @interface RegexFieldValidator
Parameter | Required | Default | Notes |
---|---|---|---|
message | yes | field error message | |
key | no | i18n key from language specific properties file. | |
messageParams | no | Additional params to be used to customize message - will be evaluated against the Value Stack | |
fieldName | no | ||
shortCircuit | no | false | If this validator should be used as shortCircuit. |
type | yes | ValidatorType.FIELD | Enum value from ValidatorType. Either FIELD or SIMPLE can be used here. |
regex | yes | The regex to validate the field value against. |
@RegexFieldValidator( key = "regex.field", regex = "yourregexp")
Modifier and Type | Optional Element and Description |
---|---|
boolean |
caseSensitive
Match the value in case sensitive manner, default true
|
String |
caseSensitiveExpression
Allows specify caseSensitive as an expression which will be evaluated during validation
|
String |
fieldName
The optional fieldName for SIMPLE validator types.
|
String |
key
The message key to lookup for i18n.
|
String |
message
The default error message for this validator.
|
String[] |
messageParams
Additional params to be used to customize message - will be evaluated against the Value Stack
|
String |
regex
Regex used to evaluate field against it
|
String |
regexExpression
Defines regex as an expression which first will be evaluated against the Value Stack to get proper regex.
|
boolean |
shortCircuit
If this is activated, the validator will be used as short-circuit.
|
boolean |
trim
To trim or not the value, default true - trim
|
String |
trimExpression
Allows specify trim as an expression which will be evaluated during validation
|
ValidatorType |
type
The validation type for this field/method.
|
public abstract String message
public abstract String[] messageParams
public abstract String key
public abstract String fieldName
public abstract String regex
public abstract String regexExpression
public abstract boolean trim
public abstract String trimExpression
public abstract boolean caseSensitive
public abstract String caseSensitiveExpression
public abstract boolean shortCircuit
public abstract ValidatorType type
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.