Package org.javalite.validation
Class RegexpValidator
java.lang.Object
org.javalite.validation.ValidatorAdapter
org.javalite.validation.RegexpValidator
- All Implemented Interfaces:
Validator
- Direct Known Subclasses:
EmailValidator
Validator designed for use of regular expressions.
-
Constructor Summary
ConstructorDescriptionRegexpValidator(String attribute, String rule)
Calls theRegexpValidator(String, String, int)
with thePattern.CASE_INSENSITIVE
flag by default.RegexpValidator(String attribute, String rule, int flags)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validate(Validatable validatable)
Called by framework when validation is requiredMethods inherited from class org.javalite.validation.ValidatorAdapter
formatMessage, getMessage, pinMessage, setMessage
-
Constructor Details
-
RegexpValidator
- Parameters:
attribute
- attribute namerule
- regular expressionflags
-Pattern
-
RegexpValidator
Calls theRegexpValidator(String, String, int)
with thePattern.CASE_INSENSITIVE
flag by default.- Parameters:
attribute
- attribute namerule
- regular expression
-
-
Method Details
-
validate
Description copied from interface:Validator
Called by framework when validation is required- Parameters:
validatable
- map being validated.
-