mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
tempfix for users with < 2 chars for username validation
This commit is contained in:
parent
138169ce6b
commit
db23061541
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ class Site < Sequel::Model
|
|||
errors.add :over_capacity, 'We are currently at capacity, and cannot create your home page. We will fix this shortly. Please come back later and try again, our apologies.'
|
||||
end
|
||||
|
||||
if !values[:username].match(VALID_HOSTNAME)
|
||||
# TODO regex fails for usernames <= 2 chars, tempfix for now.
|
||||
if values[:username].length > 2 && !values[:username].match(VALID_HOSTNAME)
|
||||
errors.add :username, 'A valid user/site name is required.'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue