email-validate-hs icon indicating copy to clipboard operation
email-validate-hs copied to clipboard

added domain name validation module

Open afcady opened this issue 9 years ago • 2 comments

I couldn't find anything on hackage to validate just a domain name, so I used your domainLiteral parser.

I added a Text.Domain.Validate module which is just Text.Email.Validate with the parser and return type changed.

afcady avatar Jan 24 '16 20:01 afcady

Thanks for this!

Unfortunately at the moment this won't be that useful as the domain parsing is quite lenient - the email-address RFC allows many more things in domain names than the domain-name RFC (see #5, for example).

I intend to do some work this week to make this stricter, so I'll hold off merging your PR until that is complete.

Porges avatar Jan 24 '16 20:01 Porges

Ooops, I used domainLiteral where I should have used dottedAtoms. Fixed now.

Unfortunately I used git commit --amend thinking this wouldn't have been seen yet, sorry.

afcady avatar Jan 24 '16 20:01 afcady