coomet length max 300
This commit is contained in:
@@ -3,6 +3,6 @@ import { z } from 'zod';
|
||||
export const orderForm = z.object({
|
||||
long: 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(),
|
||||
});
|
||||
|
||||
@@ -376,10 +376,14 @@ const OrderPage = () => {
|
||||
<FormControl>
|
||||
<Textarea
|
||||
{...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"
|
||||
placeholder={t('Izoh')}
|
||||
/>
|
||||
</FormControl>
|
||||
<div className="text-right text-xs text-gray-500">
|
||||
{field.value?.length || 0}/300
|
||||
</div>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
@@ -442,10 +442,14 @@ const RefreshOrder = () => {
|
||||
<FormControl>
|
||||
<Textarea
|
||||
{...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"
|
||||
placeholder={t('Izoh')}
|
||||
/>
|
||||
</FormControl>
|
||||
<div className="text-right text-xs text-gray-500">
|
||||
{field.value?.length || 0}/300
|
||||
</div>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user