HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleemail-validate-2.3.2.21Haskell2010

Text.Email.Validate

  • 1 type
  • 8 values
valueisValid :: ByteString -> Bool
#

Validates whether a particular string is an email address according to RFC5322.

If you want to find out *why* a particular string is not an email address, use this.

Examples (both require OverloadedStrings to be enabled):

Example1 expression
validate "example@example.com"Right "example@example.com"
Example1 expression
validate "not.good"Left "at sign > @: not enough input"

Checks that an email is valid and returns a version of it where comments and whitespace have been removed.

Example (requires OverloadedStrings to be enabled):

Example1 expression
canonicalizeEmail "spaces. are. allowed@example.com"Just "spaces.are.allowed@example.com"
datadata EmailAddress
#

Represents an email address.

Instances7Eq, Data, Ord, Read, Show, Generic, …