public class LengthValidator extends AbstractValidator
Modifier and Type | Class and Description |
---|---|
static class |
LengthValidator.Type
Type specifies what the LengthValidator should check.
|
Constructor and Description |
---|
LengthValidator(LengthValidator.Type type,
int length)
Construct a validator that checks the length of the input to match the
given type and value.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a human readable representation of this Validator.
|
String |
validate(Object value)
Checks whether the given value is valid.
|
getObjectAs, isAlwaysTrue
public LengthValidator(LengthValidator.Type type, int length)
type
- the length attribute to check forlength
- the length to check forpublic String validate(Object value)
Validator
value
- the value to checkValidator.validate(Object)
public String getDescription()
Validator
Validator.getDescription()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a