Skip to content

Commit 96dff89

Browse files
refactor(web): use top-level z.url() over deprecated z.string().url()
Zod v4 deprecates the chained .url() in favor of the top-level format validator.
1 parent 409d7d8 commit 96dff89

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/web/src/lib/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function isCloudInstance(instance: Pick<Instance, "baseUrl">): boolean {
2323
}
2424

2525
export const configSchema = z.object({
26-
baseUrl: z.string().url({ message: "Must be a valid URL" }),
26+
baseUrl: z.url({ message: "Must be a valid URL" }),
2727
token: z.string().optional().default(""),
2828
});
2929

@@ -32,7 +32,7 @@ export type Config = z.infer<typeof configSchema>;
3232
export const instanceSchema = z.object({
3333
id: z.string().min(1),
3434
name: z.string().min(1, { message: "Name is required" }),
35-
baseUrl: z.string().url({ message: "Must be a valid URL" }),
35+
baseUrl: z.url({ message: "Must be a valid URL" }),
3636
token: z.string().optional().default(""),
3737
});
3838

0 commit comments

Comments
 (0)