org.javalid.core.validator
Class MinLengthValidatorImpl
java.lang.Object
org.javalid.core.validator.AbstractJavalidValidatorImpl<T>
org.javalid.core.validator.AbstractLengthValidatorImpl<MinLength>
org.javalid.core.validator.MinLengthValidatorImpl
- All Implemented Interfaces:
- JavalidValidator<MinLength>
public class MinLengthValidatorImpl
- extends AbstractLengthValidatorImpl<MinLength>
This class is responsible for validating the MinLength annotation.
Checks if given value has the minimum length specified on the annotation.
Can be applied to methods returning: java.lang.String, java.lang.StringBuffer
or java.lang.StringBuilder.
On error adds a ValidationMessage of: MessageCodes.MSG_MIN_LENGTH_ERROR
ValidationMessage's value property contains currentValue,annotationValue.
Changes for 1.1:
- Removed ValidatorSupport instance, using its static methods instead
Changes for 1.2:
- Refactored: Extends AbstractLengthValidatorImpl
- Byte length comparison added
- Support to annotate on StringBuilder
- Since:
- 1.0
- Version:
- 1.2
- Author:
- M.Reuvers
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinLengthValidatorImpl
public MinLengthValidatorImpl()
doValidate
public java.util.List<ValidationMessage> doValidate(MinLength annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config)
- Specified by:
doValidate in class AbstractJavalidValidatorImpl<MinLength>