mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-29 04:59:26 +02:00
24 lines
521 B
TypeScript
24 lines
521 B
TypeScript
import vine from '@vinejs/vine'
|
|
|
|
export const remoteDownloadValidator = vine.compile(
|
|
vine.object({
|
|
url: vine.string().url({
|
|
require_tld: false, // Allow local URLs
|
|
}).trim(),
|
|
})
|
|
)
|
|
|
|
export const remoteDownloadValidatorOptional = vine.compile(
|
|
vine.object({
|
|
url: vine.string().url({
|
|
require_tld: false, // Allow local URLs
|
|
}).trim().optional(),
|
|
})
|
|
)
|
|
|
|
export const filenameValidator = vine.compile(
|
|
vine.object({
|
|
filename: vine.string().trim().minLength(1).maxLength(4096),
|
|
})
|
|
)
|