Validating an email address string against RFC 5322
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs/Text/Email
src/Text/Email
test
.gitignore
.travis.yml
LICENSE
README.md
bower.json
package-lock.json
package.json

README.md

purescript-email-validate

Build Status

A small library providing an EmailAddress type. Based on the Haskell library email-validate.

Installing

$ npm install
$ ./node_modules/.bin/bower install purescript-email-validate

Building / Testing

$ pulp build
$ pulp test

Usage

> import Text.Email.Validate (EmailAddress(), toString, emailAddress)
> :t emailAddress
String -> Either String EmailAddress
> emailAddress "test@email.com"
Right test@email.com
> emailAddress "bad@email@address"
Left "bad email address"
> :t toString
EmailAddress -> String
> toString $ emailAddress "test@email.com"
test@email.com