Optionally raise validation errors.