coomet length max 300
This commit is contained in:
@@ -3,6 +3,6 @@ import { z } from 'zod';
|
|||||||
export const orderForm = z.object({
|
export const orderForm = z.object({
|
||||||
long: z.string().min(1, { message: 'Majburiy maydon' }),
|
long: z.string().min(1, { message: 'Majburiy maydon' }),
|
||||||
lat: z.string().min(1, { message: 'Majburiy maydon' }),
|
lat: z.string().min(1, { message: 'Majburiy maydon' }),
|
||||||
comment: z.string().min(1, { message: 'Majburiy maydon' }),
|
comment: z.string().max(300, 'Izoh 300 ta belgidan oshmasligi kerak'),
|
||||||
city: z.string().optional(),
|
city: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -376,10 +376,14 @@ const OrderPage = () => {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
{...field}
|
{...field}
|
||||||
|
maxLength={300}
|
||||||
className="w-full min-h-42 max-h-64 border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
className="w-full min-h-42 max-h-64 border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
||||||
placeholder={t('Izoh')}
|
placeholder={t('Izoh')}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
<div className="text-right text-xs text-gray-500">
|
||||||
|
{field.value?.length || 0}/300
|
||||||
|
</div>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -442,10 +442,14 @@ const RefreshOrder = () => {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
{...field}
|
{...field}
|
||||||
|
maxLength={300}
|
||||||
className="w-full min-h-42 max-h-64 border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
className="w-full min-h-42 max-h-64 border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:border-blue-500"
|
||||||
placeholder={t('Izoh')}
|
placeholder={t('Izoh')}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
<div className="text-right text-xs text-gray-500">
|
||||||
|
{field.value?.length || 0}/300
|
||||||
|
</div>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user