fixup: next redirct rule

This commit is contained in:
oiov
2024-07-31 17:56:48 +08:00
parent 284342fa33
commit cfc0e6b71b
+1 -1
View File
@@ -14,7 +14,7 @@ import * as z from "zod";
*/
const urlPattern = /^(?!-)[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*(?<!-)$/;
const targetPattern =
/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(:\d+)?(\/[a-zA-Z0-9-]*)*\/?$/;
/^(https?:\/\/)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(:\d+)?(\/[a-zA-Z0-9-]*)*\/?$/;
export const createUrlSchema = z.object({
id: z.string().optional(),