mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Improve domain zone validation for new Dispute
This commit is contained in:
parent
ffa529c97b
commit
5fabfc7f24
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ class Dispute < ApplicationRecord
|
|||
def validate_domain_name_format
|
||||
return unless domain_name
|
||||
|
||||
zone = domain_name.split('.').last
|
||||
zone = domain_name.reverse.rpartition('.').map(&:reverse).reverse.last
|
||||
supported_zone = DNS::Zone.origins.include?(zone)
|
||||
|
||||
errors.add(:domain_name, :unsupported_zone) unless supported_zone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue