Skip to content

Commit

Permalink
Correctly use MultipleInvalid
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Jan 28, 2025
1 parent b8392b8 commit 4de1f78
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions minfraud/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
from typing import Optional

from email_validator import validate_email # type: ignore
from voluptuous import All, Any, In, Match, MultipleInvalid, Range, Required, Schema
from voluptuous import (
All,
Any,
In,
Match,
MultipleInvalid,
Range,
Required,
RequiredFieldInvalid,
Schema,
)
from voluptuous.error import UrlInvalid

# Pylint doesn't like the private function type naming for the callable
Expand Down Expand Up @@ -421,7 +431,11 @@ def _validate_at_least_one_identifier_field(report) -> bool:
"'ip_address', 'maxmind_id', 'minfraud_id', 'transaction_id'."
)
raise MultipleInvalid(
msg,
[
RequiredFieldInvalid(
msg,
)
]
)
return True

Expand Down

0 comments on commit 4de1f78

Please sign in to comment.