Class AbstractRegexRuleValidator
java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.validation.rules.AbstractRegexRuleValidator
- All Implemented Interfaces:
RuleValidator,org.springframework.core.Ordered
- Direct Known Subclasses:
BooleanRuleValidator,CollectionRuleValidator,DateRuleValidator,IsEmptyCollectionRuleValidator,LocaleRuleValidator,MoneyRuleValidator,NumberRuleValidator,StringRuleValidator
Common regex pattern matching leveraged by most
RuleValidator instances.- Author:
- Jeff Fischer
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringgetRegex()A regular expression pattern used to match and validate a SPEL-based rulevoidinit()validate(RuleInspector.RuleExpression target, org.springframework.validation.Errors errors) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.validation.rules.RuleValidator
getOrder
-
Field Details
-
pattern
-
-
Constructor Details
-
AbstractRegexRuleValidator
public AbstractRegexRuleValidator()
-
-
Method Details
-
init
@PostConstruct public void init() -
validate
public RuleValidatorResponse validate(RuleInspector.RuleExpression target, org.springframework.validation.Errors errors) - Specified by:
validatein interfaceRuleValidator
-
getRegex
A regular expression pattern used to match and validate a SPEL-based rule- Returns:
- A regular expression pattern used to match and validate a SPEL-based rule
-
getPattern
-