Skip to content

Commit

Permalink
Allow dot and hyphen in short code
Browse files Browse the repository at this point in the history
Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>
  • Loading branch information
riskycase committed Oct 7, 2024
1 parent 042fccf commit d50667e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const shortLinkSchema = z.object({
shortCode: z
.string()
.regex(
/^[a-zA-Z0-9]*$/,
"Message can only contain alphanumberic characters"
/^[a-zA-Z0-9-.]*$/,
"Message can only contain alphanumberic characters and special characters - and ."
)
.min(4, "Short code must be at least 4 characters long"),
longLink: z.string().url("Must redirect to a valid URL"),
Expand Down

0 comments on commit d50667e

Please sign in to comment.