fix: Hotfix in change from @spammer.com to spammer.com (#24479)

* fix: Hotfix in change from @spammer.com to spammer.com

* Test fixes + string

* Removed redundant test, fixed error message

* Comment fixup
This commit is contained in:
Alex van Andel authored and GitHub committed 2025-10-15 15:38:14 +01:00
1 parent bb9d99c3e1
commit 56ef5d667c
5 files changed
+57 -48

No files matched your search

@@ -2,7 +2,7 @@
import { Controller, useForm } from "react-hook-form";
import { domainWithAtRegex, emailRegex } from "@calcom/lib/emailSchema";
import { domainRegex, emailRegex } from "@calcom/lib/emailSchema";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { WatchlistType } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
@@ -71,7 +71,7 @@ export function CreateBlocklistEntryModal({ isOpen, onClose }: CreateBlocklistEn
return t("invalid_email_address");
}
} else if (watchType === WatchlistType.DOMAIN) {
if (!domainWithAtRegex.test(value)) {
if (!domainRegex.test(value)) {
return t("invalid_domain_format");
}
}
@@ -130,7 +130,7 @@ export function CreateBlocklistEntryModal({ isOpen, onClose }: CreateBlocklistEn
render={({ field }) => (
<Input
{...field}
placeholder={watchType === WatchlistType.EMAIL ? "[email protected]" : "@spammer.com"}
placeholder={watchType === WatchlistType.EMAIL ? "[email protected]" : "spammer.com"}
/>
)}
/>