Skip to content

Commit daf2b4c

Browse files
committed
Specify key reqs in validate_key_value error
1 parent e7fb0af commit daf2b4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/argus/incident/validators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def validate_key(value):
2929
key_value_re = _lazy_re_compile(r"^[a-z0-9_]+=.+?\Z")
3030
key_value_validator = RegexValidator(
3131
key_value_re,
32-
message='Enter a valid key-value construct: "key=value", where key and value are strings.',
32+
message=f'Enter a valid key-value construct: "key=value", where key and value are strings.'
33+
f'The key must consist of lowercase letters, numbers and underscores.',
3334
code="invalid",
3435
)
3536

0 commit comments

Comments
 (0)