Skip to content

Commit

Permalink
[#120] set social media url to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
511234 committed Oct 10, 2023
1 parent 55087e3 commit e290677
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/modules/post/create/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const CreatePostTemplate: React.FunctionComponent<
.url({
message: "無效連結",
})
.optional(),
.optional()
.or(z.literal('')),
description: z
.string()
.max(3000, {
Expand Down
3 changes: 2 additions & 1 deletion client/modules/profile/edit/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ const EditProfileTemplate: React.FunctionComponent<IEdiProfileTemplate> = ({
.url({
message: "無效連結",
})
.optional(),
.optional()
.or(z.literal('')),
description: conditionalValidation(3000).optional(),
countryUuid: z.string().min(1, {
message: `俾幫手填下🙏🏻`,
Expand Down

0 comments on commit e290677

Please sign in to comment.