allow numbers in username
This commit is contained in:
@@ -87,10 +87,10 @@ const SignupView = () => {
|
|||||||
isValid = false
|
isValid = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// username should only contain lowercase letters, dot and dash:
|
// username should only contain lowercase letters, numbers, dot and dash:
|
||||||
if (!/^[a-z.-]+$/.test(username)) {
|
if (!/^[a-z0-9.-]+$/.test(username)) {
|
||||||
setUsernameError(
|
setUsernameError(
|
||||||
'Username can only contain lowercase letters, dot and dash',
|
'Username can only contain lowercase letters, numbers, dot and dash',
|
||||||
)
|
)
|
||||||
isValid = false
|
isValid = false
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ const SignupView = () => {
|
|||||||
id='username'
|
id='username'
|
||||||
name='username'
|
name='username'
|
||||||
autoComplete='username'
|
autoComplete='username'
|
||||||
placeholder='lowercase letters, dot and dash'
|
placeholder='lowercase letters, numbers, dot and dash'
|
||||||
value={username}
|
value={username}
|
||||||
error={usernameError}
|
error={usernameError}
|
||||||
onChange={e => {
|
onChange={e => {
|
||||||
|
|||||||
Reference in New Issue
Block a user