T - the generic typepublic abstract class AbstractValidator<T> extends Object implements Validator<T>
Validator.Priority| Constructor and Description |
|---|
AbstractValidator(String invalidMessageOverride)
Constructor.
|
AbstractValidator(String messageKey,
Object[] messageValueArgs)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<EditorError> |
createErrorList(Editor<T> editor,
T value,
String messageKey)
Creates the error list.
|
String |
getInvalidMessage(String key)
Gets the invalid message.
|
abstract boolean |
isValid(T value)
Checks if is valid.
|
List<EditorError> |
validate(Editor<T> editor,
T value)
Validate the field.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPrioritypublic AbstractValidator(String invalidMessageOverride)
invalidMessageOverride - the invalid message overridepublic AbstractValidator(String messageKey, Object[] messageValueArgs)
messageKey - the message keymessageValueArgs - the message value argspublic List<EditorError> createErrorList(Editor<T> editor, T value, String messageKey)
editor - the editorvalue - the valuemessageKey - the message keypublic String getInvalidMessage(String key)
key - the keypublic abstract boolean isValid(T value)
value - the valueCopyright © 2017. All rights reserved.