mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 04:45:19 +00:00
remove invalid characters when auto filling domain
This commit is contained in:
parent
fc33f26808
commit
07863b2753
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ export function OrgCreateForm() {
|
|||
|
||||
const handleNameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const name = e.target.value
|
||||
const domain = name.toLowerCase().replace(/\s+/g, "-")
|
||||
const domain = name.toLowerCase().replace(/[^a-zA-Z\s]/g, "").replace(/\s+/g, "-")
|
||||
form.setValue("domain", domain)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue