allow handles to start with a number (#1231)
* allow handles to start with a number * don't allow leading hyphen
This commit is contained in:
@@ -3,7 +3,7 @@ export function makeValidHandle(str: string): string {
|
||||
str = str.slice(0, 20)
|
||||
}
|
||||
str = str.toLowerCase()
|
||||
return str.replace(/^[^a-z]+/g, '').replace(/[^a-z0-9-]/g, '')
|
||||
return str.replace(/^[^a-z0-9]+/g, '').replace(/[^a-z0-9-]/g, '')
|
||||
}
|
||||
|
||||
export function createFullHandle(name: string, domain: string): string {
|
||||
|
||||
Reference in New Issue
Block a user