Truemail v1.2.0 Release Notes
Release Date: 2019-06-26 // almost 5 years ago-
โ Added
- ๐ง Configurable option: validation for whitelisted domains only.
When email domain in whitelist and
whitelist_validation
is sets equal totrue
validation type will be passed to other validators. Validation of email which not contains whitelisted domain always will returnfalse
.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>
๐ Changed
Truemail::VERSION
- ๐ gem documentation