validator = function(value) {
      return /red|white|gold/i.test(value);
    }
Errors returned after failed validation contain an `errors` object
whose values are `ValidatorError` objects. Each
[ValidatorError](./api/error-validation-js.html#error-validation-js) has `kind`, `path`,
`value`, and `message` properties.
A ValidatorError also may have a `reason` property. If an error was
thrown in the validator, this property will contain the error that was
thrown.