Package org.javalite.validation
Class RangeValidator
- java.lang.Object
-
- org.javalite.validation.ValidatorAdapter
-
- org.javalite.validation.RangeValidator
-
- All Implemented Interfaces:
Validator
public class RangeValidator extends ValidatorAdapter
-
-
Constructor Summary
Constructors Constructor Description RangeValidator(String attribute, Number min, Number max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringformatMessage(Locale locale, Object... params)Provides default implementation, will look for a property in resource bundle, using set message as key.voidvalidate(Validatable validatable)Called by framework when validation is required-
Methods inherited from class org.javalite.validation.ValidatorAdapter
getMessage, pinMessage, setMessage
-
-
-
-
Method Detail
-
validate
public void validate(Validatable validatable)
Description copied from interface:ValidatorCalled by framework when validation is required- Parameters:
validatable- map being validated.
-
formatMessage
public String formatMessage(Locale locale, Object... params)
Description copied from class:ValidatorAdapterProvides default implementation, will look for a property in resource bundle, using set message as key. If property in resource bundle not found, treats message verbatim.- Specified by:
formatMessagein interfaceValidator- Overrides:
formatMessagein classValidatorAdapter- Parameters:
locale- locale to use, or null for default locale.params- parameters in case a message is parametrized.- Returns:
- formatted message.
-
-