Skip to content

Commit a53694d

Browse files
committed
revert: min char requirement - enterprise form body
1 parent 91ecdd7 commit a53694d

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

app/[locale]/enterprise/_components/ContactForm/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ import Input from "@/components/ui/input"
88
import { Spinner } from "@/components/ui/spinner"
99
import { Textarea } from "@/components/ui/textarea"
1010

11-
import { CONTACT_FORM_CHAR_MIN } from "../../constants"
12-
1311
type EnterpriseContactFormProps = {
1412
strings: {
1513
error: {
1614
domain: string
1715
emailInvalid: string
1816
general: string
19-
minLength: React.ReactNode // constant injected into span
2017
required: string
2118
}
2219
placeholder: {
@@ -127,8 +124,6 @@ const EnterpriseContactForm = ({ strings }: EnterpriseContactFormProps) => {
127124

128125
if (!sanitized) return strings.error.required
129126

130-
if (sanitized.length < CONTACT_FORM_CHAR_MIN) return strings.error.minLength
131-
132127
return undefined
133128
}
134129

app/[locale]/enterprise/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
// TODO: Confirm
22
export const ENTERPRISE_MAILTO =
33
"mailto:[email protected]?subject=Enterprise%20inquiry"
4-
5-
export const CONTACT_FORM_CHAR_MIN = 40

app/[locale]/enterprise/page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import { BASE_TIME_UNIT } from "@/lib/constants"
5151
import CasesColumn from "./_components/CasesColumn"
5252
import EnterpriseContactForm from "./_components/ContactForm/lazy"
5353
import FeatureCard from "./_components/FeatureCard"
54-
import { CONTACT_FORM_CHAR_MIN, ENTERPRISE_MAILTO } from "./constants"
54+
import { ENTERPRISE_MAILTO } from "./constants"
5555
import type { Case, EcosystemPlayer, Feature } from "./types"
5656
import { parseActivity } from "./utils"
5757

@@ -503,9 +503,6 @@ const Page = async ({ params }: { params: { locale: Lang } }) => {
503503
"page-enterprise-team-form-error-email-invalid"
504504
),
505505
general: t("page-enterprise-team-form-error-general"),
506-
minLength: t.rich("page-enterprise-team-form-error-short", {
507-
span: () => CONTACT_FORM_CHAR_MIN,
508-
}),
509506
required: t("page-enterprise-team-form-error-required"),
510507
},
511508
placeholder: {

app/api/enterprise-contact/route.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { NextRequest, NextResponse } from "next/server"
22

3-
import { CONTACT_FORM_CHAR_MIN } from "../../[locale]/enterprise/constants"
4-
53
const ENTERPRISE_EMAIL = "[email protected]"
64
const RATE_LIMIT_WINDOW_MS = 60 * 1000 // 1 minute
75
const MAX_REQUESTS_PER_WINDOW = 3
@@ -90,16 +88,6 @@ export async function POST(request: NextRequest) {
9088
)
9189
}
9290

93-
// Validate message length
94-
if (sanitizedMessage.length < CONTACT_FORM_CHAR_MIN) {
95-
return NextResponse.json(
96-
{
97-
error: `Message must be at least ${CONTACT_FORM_CHAR_MIN} characters`,
98-
},
99-
{ status: 400 }
100-
)
101-
}
102-
10391
// Create email content
10492
const emailSubject = "Enterprise Inquiry from ethereum.org"
10593
const emailBody = `

0 commit comments

Comments
 (0)