Modified files after rebase

This commit is contained in:
Sergei Tsõganov 2022-10-12 10:44:15 +03:00
parent 59ecfa8e2f
commit 532b9039d2
2 changed files with 6 additions and 0 deletions

View file

@ -182,6 +182,9 @@ tara_rant_secret: 'secret'
tara_rant_redirect_uri: 'redirect_uri'
default_email_validation_type: 'mx'
# You can predefine regex only validation for domains (i.e. 'somedomain.com, otherdomain.com'):
regex_only_email_validations: ''
default_connection_timeout: '1'
default_response_timeout: '1'

View file

@ -48,6 +48,9 @@ Truemail.configure do |config|
# And all of validations for 'otherdomain.com' will be processed with mx validation only.
# It is equal to empty hash by default.
# config.validation_type_for = { 'somedomain.com' => :regex, 'otherdomain.com' => :mx }
config.validation_type_for = ENV['regex_only_email_validations'].split(/,/)
.collect { |d| [d.strip, :regex] }
.to_h
# Optional parameter. Validation of email which contains whitelisted domain always will
# return true. Other validations will not processed even if it was defined in validation_type_for