Skip to content

Commit f0ae443

Browse files
committed
fix: werid validation on custom suffix omission
1 parent 796b18a commit f0ae443

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/forms/shorten-link-form-base.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function ShortenLinkFormBase({
3636
defaultValues: {
3737
name: "",
3838
link: "",
39-
customSuffix: "",
39+
customSuffix: undefined,
4040
},
4141
});
4242

schemas/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const shortenLinkSchema = z.object({
2727
.string()
2828
.min(3, { message: "Custom suffix is too short" })
2929
.optional()
30-
.or(z.literal("")),
30+
.or(z.undefined()),
3131
});
3232

3333
export const changeCustomSuffixSchema = z.object({

0 commit comments

Comments
 (0)