Add error type to validationError object