Skip to content

Commit 4de1f78

Browse files
committed
Correctly use MultipleInvalid
1 parent b8392b8 commit 4de1f78

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

minfraud/validation.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,17 @@
1515
from typing import Optional
1616

1717
from email_validator import validate_email # type: ignore
18-
from voluptuous import All, Any, In, Match, MultipleInvalid, Range, Required, Schema
18+
from voluptuous import (
19+
All,
20+
Any,
21+
In,
22+
Match,
23+
MultipleInvalid,
24+
Range,
25+
Required,
26+
RequiredFieldInvalid,
27+
Schema,
28+
)
1929
from voluptuous.error import UrlInvalid
2030

2131
# Pylint doesn't like the private function type naming for the callable
@@ -421,7 +431,11 @@ def _validate_at_least_one_identifier_field(report) -> bool:
421431
"'ip_address', 'maxmind_id', 'minfraud_id', 'transaction_id'."
422432
)
423433
raise MultipleInvalid(
424-
msg,
434+
[
435+
RequiredFieldInvalid(
436+
msg,
437+
)
438+
]
425439
)
426440
return True
427441

0 commit comments

Comments
 (0)