org.srplib.validation
Class RegexpValidator
java.lang.Object
org.srplib.validation.AbstractValidator<String>
org.srplib.validation.RegexpValidator
- All Implemented Interfaces:
- Validator<String>
- Direct Known Subclasses:
- EmailAddressValidator, PhoneNumberValidator
public class RegexpValidator
- extends AbstractValidator<String>
Validates strings with regular expression.
- Author:
- Anton Pechinsky
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexpValidator
public RegexpValidator(String regexp)
- Creates validators.
- Parameters:
regexp - String regular expression.
isValid
protected boolean isValid(Validatable<String> validatable)
- Specified by:
isValid in class AbstractValidator<String>
newError
protected ValidationError newError()
- Specified by:
newError in class AbstractValidator<String>
Copyright © 2012. All Rights Reserved.