Skip to content

Commit

Permalink
tiny typo fix for min length validator's error string
Browse files Browse the repository at this point in the history
  • Loading branch information
ckutlu authored and Caglar Kutlu committed Nov 29, 2023
1 parent 0d1be89 commit f07cd6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/attr/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,10 @@ def __call__(self, inst, attr, value):
We use a callable class to be able to change the ``__repr__``.
"""
if len(value) < self.min_length:
msg = f"Length of '{attr.name}' must be => {self.min_length}: {len(value)}"
msg = f"Length of '{attr.name}' must be >= {self.min_length}: {len(value)}"
raise ValueError(msg)


def __repr__(self):
return f"<min_len validator for {self.min_length}>"

Expand Down

0 comments on commit f07cd6e

Please sign in to comment.