purescript-email-validate
purescript-email-validate copied to clipboard
Confusing error message for attempted email addresses like "foo@"
When attempting email addresses like foo@, this gives
Email validation error: Could not match character '['
Which is correctly marked as invalid but the message itself does not seem to be very useful.
purescript-email-validate is mostly just a purescript rewrite of the Haskell library email-validate, warts and all.
This particular problem seems to come from email validate:
$ stack ghci --package email-validate
> import Text.Email.Validate
> :set -XOverloadedStrings
> validate "foo@"
Left "[: not enough input"
If you'd like to fix up the parser to give better error messages, I imagine a lot of people would find that useful.