mirror of
https://github.com/django/django.git
synced 2025-12-05 09:33:25 +00:00
Fixed #28906 -- Removed unnecessary bool() calls.
This commit is contained in:
parent
02d9419fe3
commit
2b81faab25
7 changed files with 7 additions and 10 deletions
|
|
@ -54,7 +54,7 @@ class RegexValidator:
|
|||
Validate that the input contains (or does *not* contain, if
|
||||
inverse_match is True) a match for the regular expression.
|
||||
"""
|
||||
regex_matches = bool(self.regex.search(str(value)))
|
||||
regex_matches = self.regex.search(str(value))
|
||||
invalid_input = regex_matches if self.inverse_match else not regex_matches
|
||||
if invalid_input:
|
||||
raise ValidationError(self.message, code=self.code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue