org.javalite.activejdbc.validation
Class RangeValidator
java.lang.Object
org.javalite.activejdbc.validation.ValidatorAdapter
org.javalite.activejdbc.validation.RangeValidator
- All Implemented Interfaces:
- Validator
public class RangeValidator
- extends ValidatorAdapter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RangeValidator
public RangeValidator(String attribute,
Number min,
Number max)
validate
public void validate(Model m)
- Description copied from interface:
Validator
- Called by framework when a
Model.validate() method called.
- Parameters:
m - model being validated.
formatMessage
public String formatMessage(Locale locale,
Object... params)
- Description copied from class:
ValidatorAdapter
- Provides 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:
formatMessage in interface Validator- Overrides:
formatMessage in class ValidatorAdapter
- Parameters:
locale - locale to use, or null for default locale.params - parameters in case a message is parametrized.
- Returns:
- formatted message.
Copyright © 2015 JavaLite. All rights reserved.