org.javalid.core.validator
Class RegularExpressionValidatorImpl

java.lang.Object
  extended by org.javalid.core.validator.AbstractJavalidValidatorImpl<RegularExpression>
      extended by 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:

Changes for 1.2:

Since:
1.0
Version:
1.2
Author:
M.Reuvers

Constructor Summary
RegularExpressionValidatorImpl()
           
 
Method Summary
 java.util.List<ValidationMessage> doValidate(RegularExpression annotation, java.lang.Object value, java.lang.String path, JvConfigurationWrapper config)
           
 
Methods inherited from class org.javalid.core.validator.AbstractJavalidValidatorImpl
checkIsSingleExpression, requiresComplexCall, validate, validateComplex, validationMustBeAppliedToGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegularExpressionValidatorImpl

public RegularExpressionValidatorImpl()
Method Detail

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>