Files
pc_builder/app/validators/user.ts
T
2026-06-28 10:41:51 +02:00

13 lines
391 B
TypeScript

import vine from '@vinejs/vine'
const email = () => vine.string().email().maxLength(254)
const password = () => vine.string().minLength(8).maxLength(32)
export const signupValidator = vine.create({
fullName: vine.string().nullable(),
email: email().unique({ table: 'users', column: 'email' }),
password: password().confirmed({
confirmationField: 'passwordConfirmation',
}),
})