Skip to content

Commit

Permalink
Merge pull request #94 from jdufresne/spelling
Browse files Browse the repository at this point in the history
Update spelling: e-mail -> email
  • Loading branch information
alexdunae committed Aug 19, 2022
2 parents 0f8a1c3 + b349a63 commit 6eb701c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://github.com/validates-email-format-of/validates_email_format_of/actions/workflows/ci.yml/badge.svg)]( https://github.com/validates-email-format-of/validates_email_format_of/actions/workflows/ci.yml?query=branch%3Amaster)

A Ruby gem to validate e-mail addresses against RFC 2822 and RFC 5322.
A Ruby gem to validate email addresses against RFC 2822 and RFC 5322.

## Why this email validator?

Expand Down Expand Up @@ -50,14 +50,14 @@ ValidatesEmailFormatOf::load_i18n_locales
I18n.locale = :pl

ValidatesEmailFormatOf::validate_email_format("example@mydomain.com") # => nil
ValidatesEmailFormatOf::validate_email_format("invalid@") # => ["does not appear to be a valid e-mail address"]
ValidatesEmailFormatOf::validate_email_format("invalid@") # => ["does not appear to be a valid email address"]
```

## Options

| Option | Type | Description |
| --- | --- | --- |
| `:message` | String | A custom error message when the email format is invalid (default is: "does not appear to be a valid e-mail address") |
| `:message` | String | A custom error message when the email format is invalid (default is: "does not appear to be a valid email address") |
| `:check_mx` | Boolean | Check domain for a valid MX record (default is false) |
| `:check_mx_timeout` | Integer | Timeout in seconds for checking MX records before a `ResolvTimeout` is raised (default is 3). |
| `:mx_message` | String | A custom error message when the domain does not match a valid MX record (default is: "is not routable"). Ignored unless :check_mx option is true. |
Expand Down
2 changes: 1 addition & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ de:
activemodel: &errors
errors:
messages:
invalid_email_address: 'ist offensichtlich keine gültige E-Mail-Adresse'
invalid_email_address: 'ist offensichtlich keine gültige EMail-Adresse'
email_address_not_routable: 'kann nicht erreicht werden'
activerecord:
<<: *errors
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ en:
activemodel: &errors
errors:
messages:
invalid_email_address: 'does not appear to be a valid e-mail address'
invalid_email_address: 'does not appear to be a valid email address'
email_address_not_routable: 'is not routable'
activerecord:
<<: *errors
2 changes: 1 addition & 1 deletion config/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ it:
activemodel: &errors
errors:
messages:
invalid_email_address: 'non sembra un indirizzo e-mail valido'
invalid_email_address: 'non sembra un indirizzo email valido'
email_address_not_routable: 'dominio non raggiungibile'
activerecord:
<<: *errors
2 changes: 1 addition & 1 deletion config/locales/pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pl:
activemodel: &errors
errors:
messages:
invalid_email_address: 'nieprawidłowy adres e-mail'
invalid_email_address: 'nieprawidłowy adres email'
email_address_not_routable: 'jest nieosiągalny'
activerecord:
<<: *errors
2 changes: 1 addition & 1 deletion config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pt-BR:
activemodel: &errors
errors:
messages:
invalid_email_address: 'não parece ser um endereço de e-mail válido'
invalid_email_address: 'não parece ser um endereço de email válido'
email_address_not_routable: 'não é acessível'
activerecord:
<<: *errors
2 changes: 1 addition & 1 deletion config/locales/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pt:
activemodel: &errors
errors:
messages:
invalid_email_address: 'não parece ser um endereço de e-mail válido'
invalid_email_address: 'não parece ser um endereço de email válido'
email_address_not_routable: 'não é acessível'
activerecord:
<<: *errors
10 changes: 5 additions & 5 deletions spec/validates_email_format_of_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def self.model_name
"(unbalancedcomment@example.com"
].each do |address|
describe address do
it { should have_errors_on_email.because("does not appear to be a valid e-mail address") }
it { should have_errors_on_email.because("does not appear to be a valid email address") }
end
end

Expand All @@ -147,7 +147,7 @@ def self.model_name
it { should_not have_errors_on_email }
end
describe "#{"a" * (limit + 1)}@example.com" do
it { should have_errors_on_email.because("does not appear to be a valid e-mail address") }
it { should have_errors_on_email.because("does not appear to be a valid email address") }
end
end
describe "when using default" do
Expand All @@ -164,7 +164,7 @@ def self.model_name
it { should_not have_errors_on_email }
end
describe "user@#{"a." * (limit / 2 + 1)}com" do
it { should have_errors_on_email.because("does not appear to be a valid e-mail address") }
it { should have_errors_on_email.because("does not appear to be a valid email address") }
end
end
describe "when using default" do
Expand Down Expand Up @@ -270,7 +270,7 @@ def self.model_name
it { should_not have_errors_on_email }
end
describe "valid@example.com" do
it { should have_errors_on_email.because("does not appear to be a valid e-mail address") }
it { should have_errors_on_email.because("does not appear to be a valid email address") }
end
end

Expand All @@ -281,7 +281,7 @@ def self.model_name
describe "present locale" do
let(:locale) { :pl }
describe "invalid@exmaple." do
it { should have_errors_on_email.because("nieprawidłowy adres e-mail") }
it { should have_errors_on_email.because("nieprawidłowy adres email") }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion validates_email_format_of.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "validates_email_format_of/version"
Gem::Specification.new do |s|
s.name = "validates_email_format_of"
s.version = ValidatesEmailFormatOf::VERSION
s.summary = "Validate e-mail addresses against RFC 2822 and RFC 3696."
s.summary = "Validate email addresses against RFC 2822 and RFC 3696."
s.description = s.summary
s.authors = ["Alex Dunae", "Isaac Betesh"]
s.email = ["code@dunae.ca", "iybetesh@gmail.com"]
Expand Down

0 comments on commit 6eb701c

Please sign in to comment.