Creates a new instance of ValidationResult
.
new ValidationResult('name', 123, [
{ message: 'must be a string', validation: false },
{ message: 'must be at least 2 characters', validation: true }
]);
The key being validated.
validatedResult.key; // 'name'
Result of the validations.
validationResult.validations;
[
{ message: 'must be a string', validation: false },
{ message: 'must be at least 2 characters', validation: true }
];
The value being validated.
validatedResult.value; // 'Lauren'
Is the change invalid?
validationResult.isInvalid; // true
Is the change valid?
validationResult.isValid; // true
Validation message for use in case of validation failure.
validationResult.message; // 'key cannot be blank'
Generated using TypeDoc
Wrapper class for post-validation changes to a
BufferedProxy
. All validator functions return an instance of this class, to allow for a single interface when updating the state of aBufferedProxy
.