Skip to content

Commit

Permalink
Merge pull request #39 from Kefaku/main
Browse files Browse the repository at this point in the history
invert check for slug starting with a hyphen
  • Loading branch information
HoodieRocks authored Jan 22, 2024
2 parents 180999f + 8578944 commit 249ecde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/projects/new/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const newProjectSchema = z.object({
message:
"Slug can only contain lower case alphanumeric characters and hyphens!"
})
.regex(/^-/, {
.regex(/^[^-]/, {
message: "Slug may not start with a hyphen!"
})
.min(1, { message: "Slug is empty!" })
Expand Down

0 comments on commit 249ecde

Please sign in to comment.