No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Arthur Poulet e681e964a5
Update readme
6 months ago
spec Improve Rfc1123::Public (minor rfc fix) 3 years ago
src Update version 2 years ago
.gitignore initialize the project 3 years ago
.travis.yml initialize the project 3 years ago
CHANGELOG Update version 2 years ago
LICENSE initialize the project 3 years ago
README.md Update readme 6 months ago
shard.yml Update readme 6 months ago

README.md

A RFC compliant Email validator

Prelude

Compliance

To do

  • To do : rfc 6530.
  • To do : Implement IPv6

Notes

  • No ipv6 for now
  • No escaped characters
  • Public email validity (no raw ip, domain withour root domain, …)

Installation

Works with crystal 0.17 - 0.27.0

Add this to your application’s shard.yml:

dependencies:
  CrystalEmail:
      git: https://git.sceptique.eu/Sceptique/CrystalEmail

 Usage in Crystal

require "CrystalEmail"

# Pure Rfc5322
CrystalEmail::Rfc5322.validates? "toto@tata" # => true
CrystalEmail::Rfc5322.match "toto@tata" # => #<MatchData "toto@tata" local:"toto" domain:"tata">
CrystalEmail::Rfc5322.validates? "toto" # => false
CrystalEmail::Rfc5322.match "toto" # => nil

# Rfc5322 + Internet basic usage
CrystalEmail::Rfc5322::Public.validates? "toto@tata.com" # => true
CrystalEmail::Rfc5322::Public.match "toto@tata.com" # => #<MatchData "toto@tata" local:"toto" domain:"tata.com">

"toto@toto.toto".is_email? # => true

Contributes !

Find a bug ? Want a new feature ? Create a clear pull request and we’ll see :)

  • Sceptique