mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
Use translation file for errors, display reserved domain error through epp
This commit is contained in:
parent
e3c60d51fe
commit
d96b1b5deb
6 changed files with 40 additions and 2 deletions
|
@ -10,7 +10,7 @@ class DomainNameValidator < ActiveModel::EachValidator
|
|||
if !self.class.validate_format(value)
|
||||
record.errors[attribute] << (options[:message] || 'invalid format')
|
||||
elsif !self.class.validate_reservation(value)
|
||||
record.errors[attribute] << (options[:message] || 'Domain name is reserved or restricted')
|
||||
record.errors[attribute] << (options[:message] || I18n.t('errors.messages.epp_domain_reserved'))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue