[CAL-409] Prevents usernames with special characters (#668)

This commit is contained in:
Omar López authored and GitHub committed 2021-09-18 00:08:02 +01:00
1 parent dd9f5fe791
commit f6005b8c70
2 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
export const slugify = (str: string) => {
return str.replace(/\s+/g, "-").toLowerCase();
return str.replace(/[^a-zA-Z0-9-]/g, "-").toLowerCase();
};
export default slugify;