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.
|
# And all of validations for 'otherdomain.com' will be processed with mx validation only.
|
||||||
# It is equal to empty hash by default.
|
# It is equal to empty hash by default.
|
||||||
# config.validation_type_for = { 'somedomain.com' => :regex, 'otherdomain.com' => :mx }
|
# config.validation_type_for = { 'somedomain.com' => :regex, 'otherdomain.com' => :mx }
|
||||||
config.validation_type_for = ENV['regex_only_email_validations'].split(/,/)
|
if ENV['regex_only_email_validations'].present?
|
||||||
.collect { |d| [d.strip, :regex] }
|
config.validation_type_for = ENV['regex_only_email_validations'].split(/,/)
|
||||||
.to_h
|
.collect { |d| [d.strip, :regex] }
|
||||||
|
.to_h
|
||||||
|
end
|
||||||
# Optional parameter. Validation of email which contains whitelisted domain always will
|
# 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
|
# return true. Other validations will not processed even if it was defined in validation_type_for
|
||||||
# It is equal to empty array by default.
|
# It is equal to empty array by default.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue