public interface Validatable
Modifier and Type | Method and Description |
---|---|
void |
addFailedValidator(Validator validator,
String errorKey)
This method is not to add validators for future processing.
|
Errors |
errors()
Provides an instance of localized
Errors object, filled with error messages after validation. |
Errors |
errors(Locale locale)
Provides an instance of localized
Errors object, filled with error messages after validation. |
Object |
get(String attribute)
Used by validators to get values
|
boolean |
isValid()
Implementation should call {#link validate()} internally.
|
void |
validate()
Runs validation.
|
void |
validate(boolean reset)
Runs validation.
|
Object get(String attribute)
attribute
- name of attributevoid addFailedValidator(Validator validator, String errorKey)
validator
- validator that failed validation (later to be used to retrieve error message)errorKey
- - generally an attribute name that failed validationboolean isValid()
void validate()
void validate(boolean reset)
reset
- true to reset all previous validation errors.Errors errors()
Errors
object, filled with error messages after validation.Errors
object, filled with error messages after validation.Copyright © 2020 JavaLite. All rights reserved.