Comments (3)
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.
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.
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)
- Upgrading to Phoenix 1.7 HOT 5
- Create account without email/password using some unique ID?
- Phoenix 1.7 compilers warning HOT 1
- Maintain case when storing emails HOT 2
- Permissions issues with mnesia backend for Pow HOT 16
- Improve mix tasks
- Crash @missing_field? in Schema.ex HOT 1
- Inject values on registration HOT 2
- users_context seems to be ignored HOT 1
- Upgrading POW from 1.6 to 1.7 HOT 12
- Changeset errors into view HOT 1
- POW & LiveView - best way to implement `assigns.current_user` ? HOT 7
- Elixir 1.15 deprecation warnings HOT 1
- Persistence of stale session ids in MnesiaCache HOT 10
- Phoenix 1.6 App upgraded to 1.7 warning about layout conflicts. HOT 2
- POW with MongoDB HOT 2
- `mix pow.install` throws error HOT 2
- How to migrate from `pow_mailer_layout` to `pow_mailer_layouts` HOT 1
- Can't generate url for email confirmation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pow.