mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-17 08:09:47 +02:00
🚧 Redirect cRUD
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const redirectNiceIdSchema = z
|
||||
.string()
|
||||
.min(1)
|
||||
.max(255)
|
||||
.regex(
|
||||
/^[a-zA-Z0-9-]+$/,
|
||||
"niceId can only contain letters, numbers, and dashes"
|
||||
);
|
||||
|
||||
export const redirectSourcePathSchema = z
|
||||
.string()
|
||||
.nonempty()
|
||||
.regex(/^\//, "sourcePath must start with a /")
|
||||
.default("/*");
|
||||
Reference in New Issue
Block a user