Interface LengthValidator
- All Superinterfaces:
Cloneable
,Validator
,ValueValidator
- All Known Implementing Classes:
LengthValidatorImpl
Verifies that the length of a string is within the borders specified (min/max).
TODO Should the LengthValidator be allowed for non-string types? For example numbers have a max length too, but it's catched with ranges already. Other data types could just use the string representation. For now only string is permitted, otherwise IllegalArgumentException.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.validate.api.validators.Validator
Validator.MergeMode
-
Method Summary
Methods inherited from interface ch.tocco.nice2.validate.api.validators.Validator
canMergeConstraints, clone, doContinueOnFailure, doNegate, getLevel, getName, getRunOn, getType, hasName, mergeConstraints, setContinue, setLevel, setName, setNegate, setRunOn, validate
-
Method Details
-
init
-
getFromIncluding
Returns the length min value which is valid including this value, or null if none specified. -
getToIncluding
Returns the length max value which is valid including this value, or null if none specified.
-