UNPKG

mt-flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

19 lines (18 loc) 753 B
import * as z from "zod"; import { EntityItemBaseSchema, commonListInputSchema } from "./_common"; export const spSiteSchema = EntityItemBaseSchema.extend({ title: z.string().min(2).max(20).default("no title spsite"), lDomain: z.string({ required_error: "domain必须填写", invalid_type_error: "domain格式不正确", }).min(5).default("root"), rDomain: z.string({ required_error: "domain必须填写", invalid_type_error: "domain格式不正确", }).default("root"), }); export const spSiteCreateSchema = spSiteSchema.extend({}); export const spSiteUpdateSchema = spSiteSchema.extend({}); export const spSiteListQuerySchema = commonListInputSchema.extend({ spSiteId: z.string().optional() });