mirror of
https://github.com/neocities/neocities.git
synced 2025-08-15 13:53:49 +02:00
only validate new records for username match
This commit is contained in:
parent
db23061541
commit
e56587a08c
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
# TODO regex fails for usernames <= 2 chars, tempfix for now.
|
||||
if values[:username].length > 2 && !values[:username].match(VALID_HOSTNAME)
|
||||
if new? && values[:username].length > 2 && !values[:username].match(VALID_HOSTNAME)
|
||||
errors.add :username, 'A valid user/site name is required.'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue