Giter Site home page Giter Site logo

Comments (3)

eahanson avatar eahanson commented on May 20, 2024 1

I tried out rbkmoney/email_validator and it worked great in my app. I also tried it in Pow and all the tests passed except for two that correctly failed on invalid email addresses but had a slightly different error message for some reason that I didn't look into. I also tried it on a list of ~3000 email addresses from a podcast crawler I wrote and I didn't see any email addresses that were rejected incorrectly.

So thanks for pointing out rbkmoney/email_validator, and I think I'll use it instead of Pow's code. And I'm guessing that it would be safe for Pow to switch to it as its default validator.

from pow.

danschultzer avatar danschultzer commented on May 20, 2024

Sure, though I think it needs to be fleshed out quite at bit more. I did a cursory look and there is already prior work with an email validator library in hex (written in erlang): https://github.com/rbkmoney/email_validator

I think the ABNF approach is much better as that is what is used in the RFCs.

from pow.

danschultzer avatar danschultzer commented on May 20, 2024

Great to know, thanks @eahanson! I wanted to do a bit better than the "just send an email and see if it works" approach matching for @, but I suspected a few edge cases wouldn't be covered with my version of an email validator. The ABNF approach makes a lot more sense than the hand-rolled parsing I did. I wish this could be part of OTP or Elixir core. I'll look into switching this in Pow, adding a TODO for now.

from pow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.