Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zudov/html-email-validate
Validating an email adress against HTML standard
https://github.com/zudov/html-email-validate
Last synced: 12 days ago
JSON representation
Validating an email adress against HTML standard
- Host: GitHub
- URL: https://github.com/zudov/html-email-validate
- Owner: zudov
- License: bsd-3-clause
- Created: 2015-02-22T03:03:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-04T12:43:57.000Z (about 7 years ago)
- Last Synced: 2023-05-23T04:15:48.335Z (over 1 year ago)
- Language: Haskell
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# html-email-validate
Validating an email address against HTML standard.
[![Travis][travis-badge]][travis-page]
[![Hackage][hackage-badge]][hackage-page]
[![Stackage LTS][stackage-lts-badge]][stackage-lts-page]
[![Stackage Nightly][stackage-nightly-badge]][stackage-nightly-page][travis-badge]: https://travis-ci.org/zudov/html-email-validate.svg?branch=master
[travis-page]: https://travis-ci.org/zudov/html-email-validate[hackage-badge]: https://img.shields.io/hackage/v/html-email-validate.svg
[hackage-page]: https://hackage.haskell.org/package/html-email-validate[stackage-lts-badge]: https://www.stackage.org/package/html-email-validate/badge/lts
[stackage-lts-page]: https://www.stackage.org/lts/package/html-email-validate[stackage-nightly-badge]: https://www.stackage.org/package/html-email-validate/badge/nightly
[stackage-nightly-page]: https://www.stackage.org/nightly/package/html-email-validateThe library allows to validate and parse an email address
as it's defined in [HTML standard](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address).Note that HTML specification of a valid email address is a
'willful violation' of RFC 5322. If you want to validate
an address against RFC 5322 you should use [email-validate](https://hackage.haskell.org/package/email-validate).## Usage
```haskell
Prelude> import Text.Html.Email.Validate
Prelude Text.Html.Email.Validate> :set -XOverloadedStrings
Prelude Text.Html.Email.Validate> isValidEmail "mailto@@mail.to"
False
Prelude Text.Html.Email.Validate> parseEmail "[email protected]"
Right [email protected]```
For more examples see [documentation on Hackage](https://hackage.haskell.org/package/html-email-validate/docs/Text-Html-Email-Validate.html).