adds validation error handling

When there are validation errors, an Error object is created with a `message` of VALIDATION_FAILED and `errors` with the original errors list from the validator.