16 lines
357 B
TypeScript
16 lines
357 B
TypeScript
import vine from '@vinejs/vine'
|
|
|
|
export const registerValidator = vine.compile(
|
|
vine.object({
|
|
username: vine.string().trim().minLength(3).maxLength(100),
|
|
password: vine.string().minLength(6).maxLength(180),
|
|
})
|
|
)
|
|
|
|
export const loginValidator = vine.compile(
|
|
vine.object({
|
|
username: vine.string().trim(),
|
|
password: vine.string(),
|
|
})
|
|
)
|