mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +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
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue