Skip to content

Commit

Permalink
Specify key reqs in validate_key_value error
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Feb 16, 2024
1 parent 3b09e9b commit 9b7e20a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/argus/incident/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def validate_key(value):
key_value_re = _lazy_re_compile(r"^[a-z0-9_]+=.+?\Z")
key_value_validator = RegexValidator(
key_value_re,
message='Enter a valid key-value construct: "key=value", where key and value are strings.',
message=f'Enter a valid key-value construct: "key=value", where key and value are strings.'
f'The key must consist of lowercase letters, numbers and underscores.',
code="invalid",
)

Expand Down

0 comments on commit 9b7e20a

Please sign in to comment.