allow handles to start with a number (#1231)
* allow handles to start with a number * don't allow leading hyphenzio/stable
parent
257c15ec1f
commit
4cc2695d84
|
@ -3,7 +3,7 @@ export function makeValidHandle(str: string): string {
|
||||||
str = str.slice(0, 20)
|
str = str.slice(0, 20)
|
||||||
}
|
}
|
||||||
str = str.toLowerCase()
|
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 {
|
export function createFullHandle(name: string, domain: string): string {
|
||||||
|
|
Loading…
Reference in New Issue