mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
refactor: split backend by context instead of type 'controllers/models/...'
This commit is contained in:
14
app/collections/validators/update_collection_validator.ts
Normal file
14
app/collections/validators/update_collection_validator.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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,
|
||||
})
|
||||
);
|
||||
Reference in New Issue
Block a user