mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-17 04:23:07 +00:00
fix zip code input field
This commit is contained in:
parent
12cc55b663
commit
01779dfd71
2 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,6 @@ export const PostalCodeInput = (props: ComponentProps<'input'>) => (
|
||||||
placeholder="00000-000"
|
placeholder="00000-000"
|
||||||
format={format}
|
format={format}
|
||||||
sanitize={sanitize}
|
sanitize={sanitize}
|
||||||
pattern="^(?:\d{8})?$"
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ export const contactSchema = z.object({
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
.regex(/^(?:\d{8})?$/, 'CEP inválido')
|
.regex(/^(?:\d{8})?$/, 'CEP inválido')
|
||||||
|
.transform((v) => (v === '' ? undefined : v))
|
||||||
.optional(),
|
.optional(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue