mirror of
https://github.com/neocities/neocities.git
synced 2025-07-24 19:38:25 +02:00
fix for username regex
This commit is contained in:
parent
5f0c590ca6
commit
372b22aa48
3 changed files with 20 additions and 1 deletions
|
@ -683,7 +683,7 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def self.valid_username?(username)
|
||||
!username.empty? && username.match(/^[a-zA-Z0-9][a-zA-Z0-9_\-]+[a-zA-Z0-9]$/i)
|
||||
!username.empty? && username.match(/^[a-zA-Z0-9]([a-zA-Z0-9_\-]{0,}[a-zA-Z0-9])?$/i) != nil
|
||||
end
|
||||
|
||||
def self.disposable_email_domains_whitelist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue