Skip to content

Commit

Permalink
fix: add country field error message (#34316)
Browse files Browse the repository at this point in the history
Description: Add country field error message in api response
VAN-1862
  • Loading branch information
ahtesham-quraish authored Mar 1, 2024
1 parent b6d89bc commit e11474d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openedx/core/djangoapps/user_authn/api/form_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ def add_country_field(is_field_required=False):
to send the field name and whether or not we want to show error message if this field is
empty
"""
return {'name': 'country', 'error_message': is_field_required}
error_msg = accounts.REQUIRED_FIELD_COUNTRY_MSG
return {'name': 'country', 'error_message': error_msg if is_field_required else ''}


def add_confirm_email_field(is_field_required=False):
Expand Down

0 comments on commit e11474d

Please sign in to comment.