Add error code to FieldValidationException.