public class RangeValidator extends ValidatorAdapter
Constructor and Description |
---|
RangeValidator(String attribute,
Number min,
Number max) |
Modifier and Type | Method and Description |
---|---|
String |
formatMessage(Locale locale,
Object... params)
Provides default implementation, will look for a property in resource bundle, using set message as key.
|
void |
validate(Model m)
Called by framework when a
Model.validate() method called. |
getMessage, setMessage
public void validate(Model m)
Validator
Model.validate()
method called.m
- model being validated.public String formatMessage(Locale locale, Object... params)
ValidatorAdapter
formatMessage
in interface Validator
formatMessage
in class ValidatorAdapter
locale
- locale to use, or null for default locale.params
- parameters in case a message is parametrized.Copyright © 2016 JavaLite. All rights reserved.