Use structured errors during validation