mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
email validation support for hostnames with punnycode
This commit is contained in:
parent
e2d0e60528
commit
9f4d4ecb8a
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,10 @@ module Actions
|
|||
extend self
|
||||
|
||||
def run(email:, level:)
|
||||
local_part, domain = email.split('@')
|
||||
decoded_domain = Addressable::IDNA.to_unicode(domain)
|
||||
email = "#{local_part}@#{decoded_domain}"
|
||||
|
||||
result = truemail_validate(email: email, level: level)
|
||||
result = validate_for_a_and_aaaa_records(email) if !result && level == :mx
|
||||
result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue