Skip to content

Commit

Permalink
[#120] set social media url to optional (#121)
Browse files Browse the repository at this point in the history
Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com>
  • Loading branch information
511234 and Pjaijai committed Oct 15, 2023
1 parent 8187d7e commit 7e15ce2
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 7e15ce2

Please sign in to comment.