Skip to content

Make prohibited_domain_characters_regex changeable#157

Merged
micke merged 2 commits intomicke:masterfrom
Lichtbit:make_prohibited_chars_changeable
Aug 7, 2020
Merged

Make prohibited_domain_characters_regex changeable#157
micke merged 2 commits intomicke:masterfrom
Lichtbit:make_prohibited_chars_changeable

Conversation

@georf
Copy link
Copy Markdown
Contributor

@georf georf commented Jul 2, 2020

On some SMTP servers you are not allowed to send mails to UTF-8 addresses. On my side its not allowed
to have "umlaut" in domain part.

This patch allows you to change the prohibited_domain_characters_regex such as a initalizer:

# config/initializers/valid_email2.rb

ValidEmail2::Address.prohibited_domain_characters_regex = /[+!_\/\s'`äöüÖÄÜß]/

On some SMTP servers you are not allowed to send mails to UTF-8 addresses. On my side its not allowed
to have "umlaut" in domain part.

This patch allows you to change the prohibited_domain_characters_regex such as a initalizer:

```ruby

ValidEmail2::Address.prohibited_domain_characters_regex = /[+!_\/\s'`äöüÖÄÜß]/
```
Copy link
Copy Markdown
Owner

@micke micke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again, sorry for the delay and thanks for yet another good PR! I've only got one comment to make it a bit more idiomatic :)

Comment thread lib/valid_email2/address.rb Outdated
Copy link
Copy Markdown
Owner

@micke micke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇 Thanks!

@micke micke merged commit b4b2d95 into micke:master Aug 7, 2020
@georf georf deleted the make_prohibited_chars_changeable branch August 10, 2020 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants