v1.2.0
Implemented configurable option: validation for whitelisted domains only.
When email domain in whitelist and whitelist_validation
is sets equal to true
validation type will be passed to other validators. Validation of email which not contains whitelisted domain always will return false
.
Truemail.configure do |config|
config.verifier_email = '[email protected]'
config.whitelisted_domains = ['white-domain.com']
config.whitelist_validation = true
end
Email has whitelisted domain
Truemail.validate('[email protected]', with: :regex)
#<Truemail::Validator:0x000055b8429f3490
@result=#<struct Truemail::Validator::Result
success=true,
email="[email protected]",
domain=nil,
mail_servers=[],
errors={},
smtp_debug=nil>,
@validation_type=:regex>
Email hasn't whitelisted domain
Truemail.validate('[email protected]', with: :regex)
#<Truemail::Validator:0x000055b8429f3490
@result=#<struct Truemail::Validator::Result
success=false,
email="[email protected]",
domain=nil,
mail_servers=[],
errors={},
smtp_debug=nil>,
@validation_type=:blacklist>
- Added validation for whitelisted domains configurable option
- Updated tests
- Updated documentation
- Updated wiki
- Updated gem version to
1.2.0