org.javalid.core.validator
Class ExactLengthValidatorImpl
java.lang.Object
org.javalid.core.validator.AbstractJavalidValidatorImpl<T>
org.javalid.core.validator.AbstractLengthValidatorImpl<ExactLength>
org.javalid.core.validator.ExactLengthValidatorImpl
- All Implemented Interfaces:
- JavalidValidator<ExactLength>
public class ExactLengthValidatorImpl
- extends AbstractLengthValidatorImpl<ExactLength>
This class is responsible for validating the ExactLength annotation.
Checks if given value has the exact 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_EXACT_LENGTH_ERROR
ValidationMessage's value property contains currentValue,annotationValue.
- 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 |
ExactLengthValidatorImpl
public ExactLengthValidatorImpl()
doValidate
public java.util.List<ValidationMessage> doValidate(ExactLength annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config)
- Specified by:
doValidate in class AbstractJavalidValidatorImpl<ExactLength>