TASKS-1823 WebManager module
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { jsonObjectSchema } from '#validators/schemas/json_object_schema'
|
||||
import vine from '@vinejs/vine'
|
||||
|
||||
export const localeSchema = vine
|
||||
.string()
|
||||
.trim()
|
||||
.minLength(2)
|
||||
.maxLength(16)
|
||||
.regex(/^[a-z]{2,3}(?:-[A-Z]{2})?$/)
|
||||
|
||||
export const pathSchema = vine
|
||||
.string()
|
||||
.trim()
|
||||
.maxLength(2048)
|
||||
.regex(/^(?:(?:[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/[a-z0-9]+(?:-[a-z0-9]+)*)*)?$/)
|
||||
|
||||
export const groupKeySchema = vine
|
||||
.string()
|
||||
.trim()
|
||||
.minLength(1)
|
||||
.maxLength(255)
|
||||
.regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
||||
|
||||
export const componentSchema = vine.object({
|
||||
type: vine
|
||||
.string()
|
||||
.trim()
|
||||
.minLength(1)
|
||||
.maxLength(100)
|
||||
.regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
||||
data: jsonObjectSchema,
|
||||
})
|
||||
Reference in New Issue
Block a user