Skip to content

Commit

Permalink
Improve validation error message
Browse files Browse the repository at this point in the history
  • Loading branch information
johanvdw committed Jan 28, 2024
1 parent c489292 commit ce30de5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion volunteers/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def save(self, activation_required=True):
def validate_matrix_id(value):
matrix_id_pattern = r'^@[a-zA-Z0-9._=-]+:[a-zA-Z0-9.-]+$'
if not re.match(matrix_id_pattern, value):
raise ValidationError('Invalid Matrix ID format')
raise ValidationError('Invalid Matrix ID format. The format is @username:homeserver.tld')
class EditProfileForm(forms.ModelForm):
""" Base form used for fields that are always required """
first_name = forms.CharField(label=_('First name'), max_length=30, required=True)
Expand Down

0 comments on commit ce30de5

Please sign in to comment.