Fixed app naming error

This commit is contained in:
frikky
2020-08-24 09:24:47 +02:00
parent 70cb64925c
commit 2ba9f7ce88
2 changed files with 17 additions and 2 deletions
+16 -1
View File
@@ -1569,7 +1569,22 @@ const AppCreator = (props) => {
margin="normal"
variant="outlined"
value={name}
onChange={e => setName(e.target.value)}
onChange={e => {
const invalid = ["#", ":", "."]
for (var key in invalid) {
if (e.target.value.includes(invalid[key])) {
alert.error("Can't use "+invalid[key]+" in name")
return
}
}
if (e.target.value.length > 100) {
alert.error("Choose a shorter name.")
return
}
setName(e.target.value)
}}
color="primary"
InputProps={{
style:{