The AbstractFieldValidator is a
module:caplin/trading/validation/Validator
that makes it easy to write Validators that record information about
errors in data that is structured as fields.
If validation errors are found, error objects are appended to the supplied
module:caplin/trading/validation/ValidationResult
.
These error objects take the form of maps with the field name as the key and the error message as a value. A map contains one or more key/value pairs.
Each FieldValidator will only append one map to the ValidationResult, containing only the errors that were found within that validator.
Subclasses of AbstractFieldValidator must call the constructor in their constructor, and must implement
module:caplin/trading/validation/AbstractFieldValidator#validateField
.
This class is immutable. Its subclasses must be as well.