Modifier and Type | Field and Description |
---|---|
protected JavaScriptSupport |
javaScriptSupport |
Modifier | Constructor and Description |
---|---|
protected |
AbstractValidator(Class<C> constraintType,
Class<T> valueType,
String messageKey,
JavaScriptSupport javaScriptSupport) |
Modifier and Type | Method and Description |
---|---|
Class<C> |
getConstraintType()
Returns the type of constraint value used with this validator.
|
String |
getMessageKey()
Returns the message key, within the validation messages, normally used by this validator.
|
Class<T> |
getValueType()
Returns the value type associated with this validator.
|
boolean |
isRequired()
Return false, which is correct for the vast majority of validators.
|
protected final JavaScriptSupport javaScriptSupport
protected AbstractValidator(Class<C> constraintType, Class<T> valueType, String messageKey, JavaScriptSupport javaScriptSupport)
public final Class<C> getConstraintType()
Validator
getConstraintType
in interface Validator<C,T>
public final Class<T> getValueType()
Validator
Validator.validate(Field, Object, MessageFormatter, Object)
will only be invoked when the value is assignable to the validator's value type.getValueType
in interface Validator<C,T>
public final String getMessageKey()
Validator
MessageFormatter
passed to Validator.validate(Field, Object, MessageFormatter, Object)
(unless
overridden).getMessageKey
in interface Validator<C,T>
public boolean isRequired()
Required
overrides this to true.FisRequired
in interface Validator<C,T>
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.