Skip to content

Commit

Permalink
fix: replace - with _
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Oct 27, 2024
1 parent 4bdbc7e commit 14c5296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/app/submit/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export const formSchema = z.object({
if (value.includes(' ')) {
ctx.addIssue({
code: 'custom',
message: 'Warning: Name contains spaces. They will be replaced with underscores.',
message: 'Warning: Name contains spaces or dashes. They will be replaced with underscores.',
});
return value.replace(/ /g, '_');
return value.replace(/[ -]/g, '_');
}
return value;
}),
Expand Down

0 comments on commit 14c5296

Please sign in to comment.