Sha256: b9a563d2f94639595b87f349a19f0a45f03e4cdeb94830e1e5e654729aaa2543

Contents?: true

Size: 1.46 KB

Versions: 14

Compression:

Stored size: 1.46 KB

Contents

# frozen_string_literal: true

INVALID_EMAILS = [
  "invalid@example-com",
  # period can not start local part
  ".invalid@example.com",
  # period can not end local part
  "invalid.@example.com",
  # period can not appear twice consecutively in local part
  "invali..d@example.com",
  # should not allow underscores in domain names
  "invalid@ex_mple.com",
  "invalid@example.com.",
  "invalid@example.com_",
  "invalid@example.com-",
  "invalid-example.com",
  "invalid@example.b#r.com",
  "invalid@example.c",
  "invali d@example.com",
  "invalidexample.com",
  "invalid@example.",
  # from http://tools.ietf.org/html/rfc3696, page 5
  # corrected in http://www.rfc-editor.org/errata_search.php?rfc=3696
  "Fred\ Bloggs_@example.com",
  'Abc\@def+@example.com',
  'Joe.\\Blow@example.com',
  "invalid.@hotmail.com",
  "invalid.@outlook.com"
].freeze

VALID_EMAILS = [
  "valid@somedomain.com",
  "Valid@test.somedomain.com",
  "valid+valid123@test.somedomain.com",
  "valid_valid123@test.somedomain.com",
  "valid-valid+123@test.somedomain.co.uk",
  "valid-valid+1.23@test.somedomain.com.au",
  "valid@somedomain.co.uk",
  "v@somedomain.com",
  "valid@somedomain.ca",
  "valid123.456@somedomain.org",
  "valid@somedomain.mobi",
  "valid@somedomain.info",
  "valid-@hotmail.com",
  "valid-@outlook.com",
  "valid_@hotmail.com",
  "valid_@outlook.com",
  "valid_-_-_-_-_-_@hotmail.com",
  "valid_-_-_-_-_-_@outlook.com",
  "sub_total-5+8@hotmail.com",
  "sub_total-5+8@outlook.com"
].freeze

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
validators-3.4.2 test/support/emails.rb
validators-3.4.1 test/support/emails.rb
validators-3.4.0 test/support/emails.rb
validators-3.3.0 test/support/emails.rb
validators-3.2.1 test/support/emails.rb
validators-3.2.0 test/support/emails.rb
validators-3.1.1 test/support/emails.rb
validators-3.1.0 test/support/emails.rb
validators-3.0.5 test/support/emails.rb
validators-3.0.4 test/support/emails.rb
validators-3.0.3 test/support/emails.rb
validators-3.0.2 test/support/emails.rb
validators-3.0.1 test/support/emails.rb
validators-3.0.0 test/support/emails.rb