mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
Merge pull request #28 from hughes/master
Adds hyphen to custom domain name regex
This commit is contained in:
commit
4c72a8f636
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
if !values[:domain].nil? && !values[:domain].empty?
|
||||
if !(values[:domain] =~ /^[a-zA-Z0-9.]+\.[a-zA-Z0-9]+$/i) || values[:domain].length > 90
|
||||
if !(values[:domain] =~ /^[a-zA-Z0-9.-]+\.[a-zA-Z0-9]+$/i) || values[:domain].length > 90
|
||||
errors.add :domain, "Domain provided is not valid. Must take the form of domain.com"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue