public class DigitCountValidator extends AbstractValidator
Modifier and Type | Class and Description |
---|---|
static class |
DigitCountValidator.Type
Type specifies what DigitCountValidator should check.
|
Constructor and Description |
---|
DigitCountValidator(DigitCountValidator.Type type,
int length)
Construct a validator that checks the digit count 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 DigitCountValidator(DigitCountValidator.Type type, int length)
type
- the digits 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