mirror of
https://github.com/neocities/neocities.git
synced 2025-07-24 19:38:25 +02:00
add experimental custom domain support
This commit is contained in:
parent
237ce5f419
commit
8014a21c2c
8 changed files with 103 additions and 2 deletions
|
@ -95,6 +95,13 @@ class Site < Sequel::Model
|
|||
if values[:password].nil? || (@password_length && @password_length < MINIMUM_PASSWORD_LENGTH)
|
||||
errors.add :password, "Password must be at least #{MINIMUM_PASSWORD_LENGTH} characters."
|
||||
end
|
||||
|
||||
if !values[:domain].nil? && !values[:domain].empty?
|
||||
if !(values[:domain] =~ /^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/i)
|
||||
errors.add :domain, "Domain provided is not valid. Must take the form of domain.com"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def file_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue