about summary refs log tree commit diff
path: root/app/models/domain_allow.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-08 23:04:19 +0200
committerGitHub <noreply@github.com>2019-08-08 23:04:19 +0200
commit7a1f8a58df7edeb4f1d03c9dd3c25d5370d858a6 (patch)
treecc52064354f522e63a70494346655202b3d2ebf9 /app/models/domain_allow.rb
parent699db454c370247684243d7497f6ebacefbb2a57 (diff)
Fix crash when saving invalid domain name (#11528)
Fix #7629
Diffstat (limited to 'app/models/domain_allow.rb')
-rw-r--r--app/models/domain_allow.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/domain_allow.rb b/app/models/domain_allow.rb
index 85018b636..5fe0e3a29 100644
--- a/app/models/domain_allow.rb
+++ b/app/models/domain_allow.rb
@@ -13,7 +13,7 @@
 class DomainAllow < ApplicationRecord
   include DomainNormalizable
 
-  validates :domain, presence: true, uniqueness: true
+  validates :domain, presence: true, uniqueness: true, domain: true
 
   scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }