made refactoring base codeclimate

This commit is contained in:
olegphenomenon 2021-12-28 12:40:18 +02:00
parent b8be4ec928
commit 7cb220e704
5 changed files with 32 additions and 24 deletions

View file

@ -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