mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 14:06:21 +02:00
update regex
This commit is contained in:
parent
f866b549b5
commit
54aefe4a2c
2 changed files with 5 additions and 4 deletions
|
@ -8,10 +8,8 @@ Truemail.configure do |config|
|
|||
# By default verifier domain based on verifier email
|
||||
# config.verifier_domain = 'internet.ee'
|
||||
|
||||
# Optional parameter. You can override default regex pattern
|
||||
config.email_pattern = /\A([\p{L}0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[\p{L}0-9!#$%&'*+\/=?^_`{|}~-]+)*)@(?i:(xn--)?(?:[\p{L}0-9][\p{L}0-9-]{0,61}[\p{L}0-9]\.)+[\p{L}]{2,63}|\[[\d.a-fA-F:]+\])\z/
|
||||
config.email_pattern = /\A(?=[\p{L}0-9!#$%&'*+\/=?^_{|}~-]*[\p{L}0-9])([\p{L}0-9!#$%&'*+\/=?^_{|}~-]+(?:\.[\p{L}0-9!#$%&'*+\/=?^_{|}~-]+)*)@(?i:(xn--)?(?:[\p{L}0-9][\p{L}0-9-]{0,61}[\p{L}0-9]\.)+[\p{L}]{2,63}|\[[\d.a-fA-F:]+\])\z/
|
||||
|
||||
# Optional parameter. You can override default regex pattern
|
||||
# config.smtp_error_body_pattern = /regex_pattern/
|
||||
|
||||
# Optional parameter. Connection timeout is equal to 2 ms by default.
|
||||
|
|
|
@ -22,11 +22,14 @@ class EmailCheckTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
invalid_emails = [
|
||||
'@@domain.com',
|
||||
'`@domain.com',
|
||||
'user..name@domain.com',
|
||||
'.user@domain.com',
|
||||
'user.@domain.com',
|
||||
'us"er@domain.com',
|
||||
'user@domain..com'
|
||||
'user@domain..com',
|
||||
'~@internet.ee'
|
||||
]
|
||||
|
||||
invalid_emails.each do |email|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue