mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Change blocked domain error message #2564
This commit is contained in:
parent
0ea07de2d1
commit
a70273a3b9
4 changed files with 8 additions and 5 deletions
|
@ -3,7 +3,7 @@ class DomainNameValidator < ActiveModel::EachValidator
|
|||
if !self.class.validate_format(value)
|
||||
record.errors[attribute] << (options[:message] || record.errors.generate_message(attribute, :invalid))
|
||||
elsif !self.class.validate_blocked(value)
|
||||
record.errors.add(attribute, (options[:message] || record.errors.generate_message(attribute, :blocked)))
|
||||
record.errors.add(:base, :domain_name_blocked)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue