Allow regex to allow empty fields
This diff will allow the regex to allow for an empty field or a match.
Then, if a value is always required a rule with .+
instead of .*
could be used instead.
-
|
|
|
82 | 82 | fieldValue = req.args.get(field) |
83 | 83 | |
84 | 84 | if fieldValue is not None: |
85 | | if not fieldValue or (rule and re.match(rule, fieldValue) is None): |
| 85 | if (rule and re.match(rule, fieldValue) is None): |
86 | 86 | return errorMessage |
87 | 87 | |
88 | 88 | def _isValidateEmail(self, email): |
Change History (4)
Description: |
modified (diff)
|
Owner: |
set to Ryan J Ollos
|
Status: |
new →
accepted
|
Resolution: |
→ fixed
|
Status: |
accepted →
closed
|
Owner: |
changed from Ryan J Ollos to jsnell@…
|
In 17288: