public interface Validator
Definition of a validator interface.
Validators are objects that are able to check if given objects are valid. Often the objects to test have been obtained from user input. If validation passes on these objects, this means that the user has entered correct data.
Implementing custom validators is very simple. There is only one main
validation method that has to be implemented. This method is passed the
object to be tested and can perform arbitrary actions to determine the
validity of this object. A TransformerContext
object
is also passed, which can be used to obtain needed system information, e.g.
the current locale.
Modifier and Type | Method and Description |
---|---|
ValidationResult |
isValid(Object o,
TransformerContext ctx)
Validates the passed in object.
|
ValidationResult isValid(Object o, TransformerContext ctx)
o
- the object to testctx
- the transformer contextCopyright © 2016 The JGUIraffe Team. All rights reserved.