Validates whether a particular string is an email address according to RFC5322.
Moduleemail-validate-2.3.2.21Haskell2010
Text.Email.Validate
- 1 type
- 8 values
- Packageemail-validate-2.3.2.21
- Exports9
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceValidate.hs
If you want to find out *why* a particular string is not an email address, use this.
Examples (both require OverloadedStrings to be enabled):
validate "example@example.com"Right "example@example.com"
validate "not.good"Left "at sign > @: not enough input"
Smart constructor for an email address
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):
canonicalizeEmail "spaces. are. allowed@example.com"Just "spaces.are.allowed@example.com"
Represents an email address.
Instances7Eq, Data, Ord, Read, Show, Generic, …
Eq EmailAddressDefined in email-validate-2.3.2.21 · Text.Email.ParserData EmailAddressDefined in email-validate-2.3.2.21 · Text.Email.ParserOrd EmailAddressDefined in email-validate-2.3.2.21 · Text.Email.ParserRead EmailAddressDefined in email-validate-2.3.2.21 · Text.Email.ParserShow EmailAddressDefined in email-validate-2.3.2.21 · Text.Email.ParserGeneric EmailAddressDefined in email-validate-2.3.2.21 · Text.Email.Parsertype Rep EmailAddress = D1 ('MetaDataDefined in email-validate-2.3.2.21 · Text.Email.Parser"EmailAddress"
"Text.Email.Parser"
"email-validate-2.3.2.21-3dTk8FNp6ez44U9hEDiZhQ"
'False) (C1 ('MetaCons"EmailAddress"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))
Extracts the domain part of an email address.
Extracts the local part of an email address.
Converts an email address back to a ByteString
Creates an email address without validating it. You should only use this when reading data from somewhere it has already been validated (e.g. a database).