From 673a657eb87a1e44265c05e857eb1af850e847b3 Mon Sep 17 00:00:00 2001 From: tapadipti Date: Mon, 16 Oct 2023 10:34:11 +0545 Subject: [PATCH] Add line break in error message --- gto/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gto/constants.py b/gto/constants.py index c0a391f2..caedb4f2 100644 --- a/gto/constants.py +++ b/gto/constants.py @@ -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." ) @@ -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." )