.
This commit is contained in:
parent
f47e12fe81
commit
65a7aeb275
4 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ Para que front e back compartilhem os mesmos schemas, eles devem residir no paco
|
||||||
// ✅ CORRETO — tipo derivado do schema
|
// ✅ CORRETO — tipo derivado do schema
|
||||||
export const zUsuarioCriar = z.object({
|
export const zUsuarioCriar = z.object({
|
||||||
nome: z.string().min(1),
|
nome: z.string().min(1),
|
||||||
email: z.string().email(),
|
email: z.email(),
|
||||||
ativo: z.boolean().default(true),
|
ativo: z.boolean().default(true),
|
||||||
})
|
})
|
||||||
export type tipoUsuarioCriar = z.infer<typeof zUsuarioCriar>
|
export type tipoUsuarioCriar = z.infer<typeof zUsuarioCriar>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ import { z } from "zod"
|
||||||
|
|
||||||
export const zUsuarioCriar = z.object({
|
export const zUsuarioCriar = z.object({
|
||||||
nome: z.string().trim().min(1, "Nome é obrigatório"),
|
nome: z.string().trim().min(1, "Nome é obrigatório"),
|
||||||
email: z.string().email("E-mail inválido"),
|
email: z.email("E-mail inválido"),
|
||||||
ativo: z.boolean().default(true),
|
ativo: z.boolean().default(true),
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ Para que front e back compartilhem os mesmos schemas, eles devem residir no paco
|
||||||
// ✅ CORRETO — tipo derivado do schema
|
// ✅ CORRETO — tipo derivado do schema
|
||||||
export const zUsuarioCriar = z.object({
|
export const zUsuarioCriar = z.object({
|
||||||
nome: z.string().min(1),
|
nome: z.string().min(1),
|
||||||
email: z.string().email(),
|
email: z.email(),
|
||||||
ativo: z.boolean().default(true),
|
ativo: z.boolean().default(true),
|
||||||
})
|
})
|
||||||
export type tipoUsuarioCriar = z.infer<typeof zUsuarioCriar>
|
export type tipoUsuarioCriar = z.infer<typeof zUsuarioCriar>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ import { z } from "zod"
|
||||||
|
|
||||||
export const zUsuarioCriar = z.object({
|
export const zUsuarioCriar = z.object({
|
||||||
nome: z.string().trim().min(1, "Nome é obrigatório"),
|
nome: z.string().trim().min(1, "Nome é obrigatório"),
|
||||||
email: z.string().email("E-mail inválido"),
|
email: z.email("E-mail inválido"),
|
||||||
ativo: z.boolean().default(true),
|
ativo: z.boolean().default(true),
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue