fix bot text style

This commit is contained in:
2026-02-19 22:46:08 +03:30
parent beda86a78e
commit 7b73faf32d
2 changed files with 21 additions and 10 deletions
+14 -2
View File
@@ -39,9 +39,20 @@ const consultingAreas = [
const formSchema = z.object({
fullName: z.string().min(2, 'نام و نام خانوادگی الزامی است'),
organization: z.string().min(1, 'نام سازمان الزامی است'),
phone: z.string().min(10, 'شماره تماس معتبر وارد کنید'),
phone: z
.string()
.min(1, 'شماره تماس الزامی است')
.refine(
(val) => {
const normalized = val
.replace(/[۰-۹]/g, (c) => '۰۱۲۳۴۵۶۷۸۹'.indexOf(c).toString())
.replace(/\D/g, '')
return normalized.length === 11 && normalized.startsWith('09')
},
'لطفاً شماره موبایل معتبر وارد کنید'
),
area: z.string().min(1, 'حوزه مشاوره را انتخاب کنید'),
description: z.string().optional(),
description: z.string().max(1000, 'حداکثر ۱۰۰۰ کاراکتر مجاز است').optional(),
})
type FormValues = z.infer<typeof formSchema>
@@ -177,6 +188,7 @@ export function ConsultingForm() {
<Textarea
placeholder="در صورت نیاز توضیح بیشتری بنویسید..."
className="min-h-24"
maxLength={1000}
{...field}
/>
</FormControl>