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:
1 parent
bb9d99c3e1
commit
56ef5d667c
5 files changed
+57
-48
No files matched your search
+3
-3
@@ -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"}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -3834,7 +3834,7 @@
|
||||
"no_description_provided": "No description provided",
|
||||
"organization_blocklist": "Organization Blocklist",
|
||||
"manage_blocked_emails_and_domains": "Manage blocked emails and domains for your organization",
|
||||
"invalid_domain_format": "Invalid domain format. Example: @example.com",
|
||||
"invalid_domain_format": "Invalid domain format. Example: example.com",
|
||||
"invalid_email_address": "Invalid email address. Example: [email protected]",
|
||||
"reason_for_adding_to_blocklist": "Reason for adding to blocklist",
|
||||
"what_would_you_like_to_block": "What would you like to block?",
|
||||
|
||||
Reference in new issue
Block a user