mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-23 19:06:35 +00:00
fix: update phone number validation to allow shorter lengths
This commit is contained in:
@@ -22,9 +22,9 @@ export const createFormSchema = (t) => z.object({
|
||||
phone_number: z
|
||||
.string()
|
||||
.optional()
|
||||
.refine(val => !val || (/^\d{6,15}$/.test(val)), {
|
||||
.refine(val => !val || (/^\d{1,15}$/.test(val)), {
|
||||
message: t('form.error.minmax', {
|
||||
min: 6,
|
||||
min: 1,
|
||||
max: 15,
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user