mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
parent
469312d7ee
commit
39d7c6ad1d
4 changed files with 24 additions and 3 deletions
|
@ -12,9 +12,9 @@ class DomainNameValidator < ActiveModel::EachValidator
|
|||
return true unless value
|
||||
value = value.mb_chars.downcase.strip
|
||||
|
||||
origins = ZonefileSetting.pluck(:origin)
|
||||
origins = ZonefileSetting.origins
|
||||
# if someone tries to register an origin domain, let this validation pass
|
||||
# the error will be catched in blocked domains validator
|
||||
# the error will be caught in blocked domains validator
|
||||
return true if origins.include?(value)
|
||||
|
||||
general_domains = /(#{origins.join('|')})/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue