Skip to content

Commit 7131d12

Browse files
committed
error message
1 parent efac896 commit 7131d12

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/src/models/utils/pre_validator_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def for_string(
2424
raise TypeError(f"{field_location} must be a string")
2525

2626
if field_value.isspace():
27-
raise ValueError(f"{field_location} must not be whitespace")
27+
raise ValueError(f"{field_location} must be a non-empty string")
2828

2929
if defined_length:
3030
if len(field_value) != defined_length:

backend/tests/testing_utils/pre_validation_test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_string_value(
8383
valid_json_data,
8484
field_location=field_location,
8585
invalid_value=invalid_whitespace_string,
86-
expected_error_message=f"{field_location} must not be whitespace",
86+
expected_error_message=f"{field_location} must be a non-empty string",
8787
)
8888

8989
# If there is a predefined string length, then test invalid string lengths,

0 commit comments

Comments
 (0)