Releases: truemail-rb/truemail
v1.3.0
v1.2.1
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 = 'verifier@example.com'
config.whitelisted_domains = ['white-domain.com']
config.whitelist_validation = true
end
Email has whitelisted domain
Truemail.validate('email@white-domain.com', with: :regex)
#<Truemail::Validator:0x000055b8429f3490
@result=#<struct Truemail::Validator::Result
success=true,
email="email@white-domain.com",
domain=nil,
mail_servers=[],
errors={},
smtp_debug=nil>,
@validation_type=:regex>
Email hasn't whitelisted domain
Truemail.validate('email@domain.com', with: :regex)
#<Truemail::Validator:0x000055b8429f3490
@result=#<struct Truemail::Validator::Result
success=false,
email="email@domain.com",
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
v1.1.0
Implemented configurable default validation type.
You can predefine default validation type for Truemail.validate('email@email.com')
call without with-parameter. Available validation types: :regex
, :mx
, :smtp
. By default validation type still remains :smtp
Truemail.configure do |config|
config.verifier_email = 'verifier@example.com'
config.default_validation_type = :mx
end
- Added configurable default validation type option, #48
- Updated tests
- Updated documentation
- Updated wiki
- Updated gem version to
1.1.0
v1.0.1
Implemented result validation type marker for domain list match check.
Truemail.validate('email@white-domain.com')
#<Truemail::Validator:0x000055b8429f3490
@result=#<struct Truemail::Validator::Result
success=true,
email="email@white-domain.com",
domain=nil,
mail_servers=[],
errors={},
smtp_debug=nil>,
@validation_type=:whitelist>
Truemail.validate('email@black-domain.com')
#<Truemail::Validator:0x000023y8429f3493
@result=#<struct Truemail::Validator::Result
success=false,
email="email@black-domain.com",
domain=nil,
mail_servers=[],
errors={},
smtp_debug=nil>,
@validation_type=:blacklist>
- Added result validation type marker to domain list match check
- Updated tests
- Updated documentation
- Updated wiki
- Updated gem version to
1.0.1
v1.0.0
Implemented feature domain whitelist blacklist. Other validations will not processed even if it was defined in validation_type_for
.
Truemail.configure do |config|
# Optional parameter. Validation of email which contains whitelisted domain
# always will return true.
config.whitelisted_domains = ['somedomain1.com', 'somedomain2.com']
# Optional parameter. Validation of email which contains whitelisted domain
# always will return false.
config.blacklisted_domains = ['somedomain1.com', 'somedomain2.com']
end
and
Truemail.configuration.whitelisted_domains = ['somedomain1.com', 'somedomain2.com']
Truemail.configuration.blacklisted_domains = ['somedomain1.com', 'somedomain2.com']
- Added new feature
- Removed
:skip
validation type forvalidation_type_for
- Fixed error key in lower_snake_case
- Updated tests
- Updated documentation
- Updated wiki
- Updated gem version to
1.0.0
v0.2.0
Implement skip validation by domain for validation_type_for configuration option:
Truemail.configure do |config|
config.validation_type_for = { 'somedomain.com' => :skip }
end
and
Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
- Added new feature
- Updated tests
- Updated documentation
- Updated wiki
- Updated gem version to
0.2.0