Skip to content

Commit

Permalink
Fixed grammar of RegexValidator error message (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayinvicible authored May 26, 2021
1 parent 4d225ea commit 5c646d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Contributors
* Mykyta Holubakha ``@Hummer12007``
* Tiago Barrionuevo ``@tiabogar``
* Isaque Alves ``@isaquealves``
* Vinay Karanam ``@vinayinvicible``

Special Thanks
==============
Expand Down
2 changes: 1 addition & 1 deletion tortoise/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, pattern: str, flags: Union[int, re.RegexFlag]):

def __call__(self, value: Any):
if not self.regex.match(value):
raise ValidationError(f"Value '{value}' not match regex '{self.regex.pattern}'")
raise ValidationError(f"Value '{value}' does not match regex '{self.regex.pattern}'")


class MaxLengthValidator(Validator):
Expand Down

0 comments on commit 5c646d3

Please sign in to comment.