Skip to content

hotwirestudios/purescript-email-validate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Validating an email address string against RFC 5322

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PureScript 100.0%