com.vaadin.data.validator
Class AbstractStringValidator
java.lang.Object
com.vaadin.data.validator.AbstractValidator<String>
com.vaadin.data.validator.AbstractStringValidator
- All Implemented Interfaces:
- Validator, Serializable
- Direct Known Subclasses:
- DoubleValidator, IntegerValidator, RegexpValidator, StringLengthValidator
public abstract class AbstractStringValidator
- extends AbstractValidator<String>
Validator base class for validating strings.
To include the value that failed validation in the exception message you can
use "{0}" in the error message. This will be replaced with the failed value
(converted to string using Object.toString()
) or "null" if the value is
null.
- Since:
- 5.4
- Version:
- 7.0.0.alpha3
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStringValidator
public AbstractStringValidator(String errorMessage)
- Constructs a validator for strings.
Null and empty string values are always accepted. To reject empty values,
set the field being validated as required.
- Parameters:
errorMessage
- the message to be included in an InvalidValueException
(with "{0}" replaced by the value that failed validation).
getType
public Class<String> getType()
- Specified by:
getType
in class AbstractValidator<String>
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.