[CAL-409] Prevents usernames with special characters (#668)
This commit is contained in:
1 parent
dd9f5fe791
commit
f6005b8c70
2 files changed
+8
-5
No files matched your search
+1
-1
@@ -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;
|
||||
Reference in new issue
Block a user