-
Notifications
You must be signed in to change notification settings - Fork 2k
Email validation #934
Comments
@ilanbiala why 0.4.x milestone? I thought we are avoiding that and always settings all PRs to the next version, unless we know it "needs more time" and so we can set it to to the one after it (i.e: 0.5) @jloveland I don't specifically mind whether we force the tld option or not. |
@jloveland I agree with this statement from the 2nd comment on that SO's accepted answer..
And since it is possible to have an email without a "." in it, shouldn't we accept it as well? |
That's why I said I'm ok with it - it is possible for example to utilize meanjs for internal enterprise projects where you may have alias addresses like root@localhost which are valid. |
@lirantal I figured we should put this up for discussion and it actually is a breaking change, so it should go in 0.5.0. |
@ilanbiala what do you refer to by a "breaking change"? |
We are changing the functionality of email validation, so if users updated to this code as 0.4.2, then their code wouldn't function as before and it might break things, hence a breaking change. |
@ilanbiala, how is allowing html5 valid emails (i.e. root@localhost) a breaking change? The application will not stop working, it will allow valid emails. If they don't want to allow root@localhost or test@test, they can remove the |
It's different than before, which breaks the expected functionality. Before we didn't allow emails without a |
I can see the "breaking change" issue from both sides. However, I think what @ilanbiala is trying to say is that even though this won't stop anything from working, it actually will allow more emails through; this could be breaking for some apps that rely on this restriction. |
OK, so Ilan, if we will want to go with this change, you prefer we do it in Regards,
|
BTW I could also argue that not allowing users anymore to create, edit, Regards,
|
@lirantal I agree.. That's a good reason for that PR to be added to the 0.5.0 milestone as well. Also, I wasn't taking a particularly strong stance on either side of this issue. I really don't know how likely it is for a user of this project to be relying on this restriction. |
@lirantal in both cases you are correct. These changes should only be published in 0.5.0 because they alter the functionality. |
I am writing some e2e test and found that 123@123 is a valid email according to HTML5 and RFC 822, but we don't support it on the back end.
If we wanted to support this we could set
validator.isEmail('test@test', {require_tld: false})
inuser.server.model
If we don't want 123@123 to be accepted on the front end, we could check for this on the front end with a pattern like so:
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,63}$"
reference: http://stackoverflow.com/questions/20573488/why-does-html5-form-validation-allow-emails-without-a-dot
The text was updated successfully, but these errors were encountered: