org.javalid.core.validator
Class RegularExpressionValidatorImpl
java.lang.Object
org.javalid.core.validator.AbstractJavalidValidatorImpl<RegularExpression>
org.javalid.core.validator.RegularExpressionValidatorImpl
- All Implemented Interfaces:
- JavalidValidator<RegularExpression>
public class RegularExpressionValidatorImpl
- extends AbstractJavalidValidatorImpl<RegularExpression>
This class is responsible for validating the RegularExpression annotation.
Checks if given value is conform a regular expression's pattern.
On error adds a ValidationMessage: MessageCodes.MSG_REGULAR_EXPRESSION_ERROR or
a customCode instead if that one was set by the user.
ValidationMessage's values property will contain {currentValue,annotion.pattern()}.
Changes for 1.1:
- Removed ValidatorSupport instance, using its static methods instead
Changes for 1.2:
- Refactored: Extends AbstractJavalidValidator
- 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 |
RegularExpressionValidatorImpl
public RegularExpressionValidatorImpl()
doValidate
public java.util.List<ValidationMessage> doValidate(RegularExpression annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config)
- Specified by:
doValidate in class AbstractJavalidValidatorImpl<RegularExpression>