tricycle/elm-email/1.0.3

NOTE: the latest version is 1.0.4

Renamed to bellroy/elm-email. It is published under that name, and new versions come out there.

Versions published as tricycle/elm-email still install under that name. 4 versions of 5 come from the new location (see their notes). 1 version could not be recovered and cannot be installed.

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/bellroy/elm-email exists but has no tag 1.0.3; Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 1.0.3 found (4 same-name repos checked); no cached copy. Use another version.

Details

elm-email

Parses email addresses safely

Demo

A demo can be found on: https://tricycle.github.io/elm-email/

Motivation

Validating email addresses using Regex is a pain.

So far I personally have never found the one Regex to rule them all.

Having the ability to parse email addresses from String not only means they are validated, but also adds the ability to then add your own additional validations on parts of the email address that might be specific to your application or such.

example

import Email

parsedEmail: Maybe Email
parsedEmail =
    Email.fromString "[email protected]"

-- Result

  Just
    { localPart = "simple"
    , tags = [ "tag" ]
    , domain = "example"
    , tld = [ "com", "au"]
    }