mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
108869472-archive
This commit is contained in:
parent
a8ff887717
commit
9278e6703f
5 changed files with 171 additions and 39 deletions
|
@ -38,7 +38,7 @@ class DomainNameValidator < ActiveModel::EachValidator
|
|||
|
||||
def validate_blocked(value)
|
||||
return true unless value
|
||||
return false if BlockedDomain.where("names @> ?::varchar[]", "{#{value}}").count > 0
|
||||
return false if BlockedDomain.where(name: value).count > 0
|
||||
ZonefileSetting.where(origin: value).count == 0
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue