mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
refactor: split backend by context instead of type 'controllers/models/...'
This commit is contained in:
11
app/links/validators/create_link_validator.ts
Normal file
11
app/links/validators/create_link_validator.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import vine from '@vinejs/vine';
|
||||
|
||||
export const createLinkValidator = vine.compile(
|
||||
vine.object({
|
||||
name: vine.string().trim().minLength(1).maxLength(254),
|
||||
description: vine.string().trim().maxLength(300).optional(),
|
||||
url: vine.string().trim(),
|
||||
favorite: vine.boolean(),
|
||||
collectionId: vine.number(),
|
||||
})
|
||||
);
|
||||
Reference in New Issue
Block a user