public interface Validator<T>
| Modifier and Type | Method and Description |
|---|---|
default String |
getInvalidMessage(T value)
If the value is not valid, this will create a user message explaining
why the value is not valid.
|
String |
getInvalidSpecificationMessage()
If the specification itself is invalid (such as a bad regex string), this
will build a message describing the problem to the user.
|
String |
getTheValueMustDescription()
Get a description of the validation rule.
|
boolean |
isSpecificationValid()
Returns true if the validation criteria itself is valid.
|
boolean |
isValid(T value) |
boolean isValid(T value)
default String getInvalidMessage(T value)
value - String getInvalidSpecificationMessage()
boolean isSpecificationValid()
String getTheValueMustDescription()
Copyright © 2017. All rights reserved.