mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 14:06:21 +02:00
Updated truemail initializer
This commit is contained in:
parent
c2e2f24ac3
commit
2061a5562e
1 changed files with 5 additions and 4 deletions
|
@ -48,10 +48,11 @@ 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 }
|
||||
if ENV['regex_only_email_validations'].present?
|
||||
config.validation_type_for = ENV['regex_only_email_validations'].split(/,/)
|
||||
.collect { |d| [d.strip, :regex] }
|
||||
.to_h
|
||||
|
||||
end
|
||||
# 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
|
||||
# It is equal to empty array by default.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue