mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 07:03:25 +00:00
15 lines
433 B
TypeScript
15 lines
433 B
TypeScript
import { Visibility } from '#collections/enums/visibility';
|
|
import { params } from '#core/validators/params_object';
|
|
import vine from '@vinejs/vine';
|
|
|
|
export const updateCollectionValidator = vine.compile(
|
|
vine.object({
|
|
name: vine.string().trim().minLength(1).maxLength(254),
|
|
description: vine.string().trim().maxLength(254).nullable(),
|
|
visibility: vine.enum(Visibility),
|
|
nextId: vine.number().optional(),
|
|
|
|
params,
|
|
})
|
|
);
|