mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
made refactoring base codeclimate
This commit is contained in:
parent
b8be4ec928
commit
7cb220e704
5 changed files with 32 additions and 24 deletions
|
@ -25,12 +25,11 @@ module Actions
|
|||
|
||||
[:regex, :mx].each do |m|
|
||||
result = Actions::SimpleMailValidator.run(email: @new_attributes[:email], level: m)
|
||||
next if result
|
||||
|
||||
unless result
|
||||
contact.add_epp_error('2005', nil, "email didn't pass validation", I18n.t(:parameter_value_syntax_error))
|
||||
@error = true
|
||||
return
|
||||
end
|
||||
contact.add_epp_error('2005', nil, "email didn't pass validation", I18n.t(:parameter_value_syntax_error))
|
||||
@error = true
|
||||
return
|
||||
end
|
||||
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue