mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
added ability to validate invalid mx email by a and aaaa records
This commit is contained in:
parent
2d2134f83c
commit
9268206daf
6 changed files with 80 additions and 20 deletions
|
@ -20,10 +20,10 @@ module Actions
|
|||
return if Rails.env.test?
|
||||
|
||||
[:regex, :mx].each do |m|
|
||||
r = Actions::SimpleMailValidator.run(email: contact.email, level: m)
|
||||
result = Actions::SimpleMailValidator.run(email: contact.email, level: m)
|
||||
|
||||
unless r.success
|
||||
contact.add_epp_error('2005', nil, r.errors, I18n.t(:parameter_value_syntax_error))
|
||||
unless result
|
||||
contact.add_epp_error('2005', nil, "email didn't pass validation", I18n.t(:parameter_value_syntax_error))
|
||||
@error = true
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue