Skip to content

Commit

Permalink
Add line break in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
tapadipti committed Oct 16, 2023
1 parent 224e1fe commit 673a657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gto/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def check_string_is_valid(value, regex=name_re):
def assert_name_is_valid(value):
if not check_string_is_valid(value, regex=name_re):
raise ValidationError(
f"Invalid value '{value}'. Only letters, numbers, '_', '-', '/' are allowed."
f"Invalid value '{value}'. Only letters, numbers, '_', '-', '/' are allowed.\n"
" Value must be of len >= 2 and must start and end with a letter or a number."
)

Expand All @@ -80,7 +80,7 @@ def assert_fullname_is_valid(value):
if not check_string_is_valid(value, regex=fullname_re):
# fix error message to be regex-specific
raise ValidationError(
f"Invalid value '{value}'. Only letters, numbers, '_', '-', '/' are allowed."
f"Invalid value '{value}'. Only letters, numbers, '_', '-', '/' are allowed.\n"
" Value must be of len >= 2 and must start and end with a letter or a number."
)

Expand Down

0 comments on commit 673a657

Please sign in to comment.