validation when contact create

This commit is contained in:
Oleg Hasjanov 2024-02-12 14:32:58 +02:00
parent 20cbdbfa75
commit 681092bc1b

View file

@ -15,6 +15,7 @@ module Actions
validate_ident
maybe_change_email
commit
validate_contact
end
def maybe_change_email
@ -88,5 +89,11 @@ module Actions
contact.email_history = contact.email
contact.save
end
def validate_contact
[:regex, :mx].each do |m|
contact.verify_email(check_level: m, single_email: true)
end
end
end
end