|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javalite.activejdbc.validation.ValidatorAdapter<T>
public abstract class ValidatorAdapter<T extends Model>
Subclass this class to create custom validators.
| Constructor Summary | |
|---|---|
ValidatorAdapter()
|
|
| Method Summary | |
|---|---|
String |
formatMessage(Locale locale,
Object... params)
Provides default implementation, will look for a property in resource bundle, using set message as key. |
String |
getMessage()
|
void |
setMessage(String message)
Sets an message on this validator. |
abstract void |
validate(T m)
Called by framework when a Model.validate() method called. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidatorAdapter()
| Method Detail |
|---|
public abstract void validate(T m)
ValidatorModel.validate() method called.
validate in interface Validator<T extends Model>m - model being validated.public final void setMessage(String message)
Validator
setMessage in interface Validator<T extends Model>message - error message.
public String formatMessage(Locale locale,
Object... params)
formatMessage in interface Validator<T extends Model>locale - locale to use.params - parameters in case a message is parametrized.
public String getMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||