File tree Expand file tree Collapse file tree 4 files changed +1
-23
lines changed Expand file tree Collapse file tree 4 files changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,12 @@ import Input from "@/components/ui/input"
8
8
import { Spinner } from "@/components/ui/spinner"
9
9
import { Textarea } from "@/components/ui/textarea"
10
10
11
- import { CONTACT_FORM_CHAR_MIN } from "../../constants"
12
-
13
11
type EnterpriseContactFormProps = {
14
12
strings : {
15
13
error : {
16
14
domain : string
17
15
emailInvalid : string
18
16
general : string
19
- minLength : React . ReactNode // constant injected into span
20
17
required : string
21
18
}
22
19
placeholder : {
@@ -127,8 +124,6 @@ const EnterpriseContactForm = ({ strings }: EnterpriseContactFormProps) => {
127
124
128
125
if ( ! sanitized ) return strings . error . required
129
126
130
- if ( sanitized . length < CONTACT_FORM_CHAR_MIN ) return strings . error . minLength
131
-
132
127
return undefined
133
128
}
134
129
Original file line number Diff line number Diff line change 1
1
// TODO: Confirm
2
2
export const ENTERPRISE_MAILTO =
3
3
"mailto:[email protected] ?subject=Enterprise%20inquiry"
4
-
5
- export const CONTACT_FORM_CHAR_MIN = 40
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ import { BASE_TIME_UNIT } from "@/lib/constants"
51
51
import CasesColumn from "./_components/CasesColumn"
52
52
import EnterpriseContactForm from "./_components/ContactForm/lazy"
53
53
import FeatureCard from "./_components/FeatureCard"
54
- import { CONTACT_FORM_CHAR_MIN , ENTERPRISE_MAILTO } from "./constants"
54
+ import { ENTERPRISE_MAILTO } from "./constants"
55
55
import type { Case , EcosystemPlayer , Feature } from "./types"
56
56
import { parseActivity } from "./utils"
57
57
@@ -503,9 +503,6 @@ const Page = async ({ params }: { params: { locale: Lang } }) => {
503
503
"page-enterprise-team-form-error-email-invalid"
504
504
) ,
505
505
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
- } ) ,
509
506
required : t ( "page-enterprise-team-form-error-required" ) ,
510
507
} ,
511
508
placeholder : {
Original file line number Diff line number Diff line change 1
1
import { NextRequest , NextResponse } from "next/server"
2
2
3
- import { CONTACT_FORM_CHAR_MIN } from "../../[locale]/enterprise/constants"
4
-
5
3
const ENTERPRISE_EMAIL = "[email protected] "
6
4
const RATE_LIMIT_WINDOW_MS = 60 * 1000 // 1 minute
7
5
const MAX_REQUESTS_PER_WINDOW = 3
@@ -90,16 +88,6 @@ export async function POST(request: NextRequest) {
90
88
)
91
89
}
92
90
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
-
103
91
// Create email content
104
92
const emailSubject = "Enterprise Inquiry from ethereum.org"
105
93
const emailBody = `
You can’t perform that action at this time.
0 commit comments