mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 03:59:33 +02:00
validation when contact create
This commit is contained in:
parent
20cbdbfa75
commit
681092bc1b
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,7 @@ module Actions
|
||||||
validate_ident
|
validate_ident
|
||||||
maybe_change_email
|
maybe_change_email
|
||||||
commit
|
commit
|
||||||
|
validate_contact
|
||||||
end
|
end
|
||||||
|
|
||||||
def maybe_change_email
|
def maybe_change_email
|
||||||
|
@ -88,5 +89,11 @@ module Actions
|
||||||
contact.email_history = contact.email
|
contact.email_history = contact.email
|
||||||
contact.save
|
contact.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def validate_contact
|
||||||
|
[:regex, :mx].each do |m|
|
||||||
|
contact.verify_email(check_level: m, single_email: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue