

def get_error_message(self, form, field_name):
    return (form[field_name].errors[0] if form[field_name].errors else None)

dataset/ETHPy150Open dimagi/commcare-hq/corehq/messaging/smsbackends/telerivet/views.py TelerivetSetupView.get_error_message/original