forked from mirrors/thatmattlove-hyperglass
fix issue where pattern rules failed validation
This commit is contained in:
parent
6d06b9809d
commit
08fd310b44
1 changed files with 1 additions and 4 deletions
|
|
@ -216,7 +216,7 @@ class RuleWithPattern(Rule):
|
|||
return InputValidationError(target=value, error="Denied")
|
||||
return False
|
||||
|
||||
if isinstance(target, t.List) and multiple:
|
||||
if isinstance(target, t.List):
|
||||
for result in (validate_single_value(v) for v in target):
|
||||
if isinstance(result, BaseException):
|
||||
self._passed = False
|
||||
|
|
@ -227,9 +227,6 @@ class RuleWithPattern(Rule):
|
|||
self._passed = True
|
||||
return True
|
||||
|
||||
if isinstance(target, t.List) and not multiple:
|
||||
raise InputValidationError(error="Target must be a single value", target=target)
|
||||
|
||||
result = validate_single_value(target)
|
||||
|
||||
if isinstance(result, BaseException):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue