-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,12 +47,12 @@ class ClaimModel(BaseModel): | |
|
||
@field_validator("policyholder_email") | ||
@classmethod | ||
def _policyholder_email_validator(cls, email: str) -> str: | ||
if not re.match(EMAIL_PARSER_R, email): | ||
def _policyholder_email_validator(cls, policyholder_email: str) -> str: | ||
if policyholder_email and not re.match(EMAIL_PARSER_R, policyholder_email): | ||
raise ValueError( | ||
'Invalid email address, please use a valid email (e.g. "[email protected]").' | ||
) | ||
return email | ||
return policyholder_email | ||
|
||
@staticmethod | ||
def editable_fields() -> Set[str]: | ||
|