Comments (7)
The email address is never used, why bother validating it?
from twitarr.
I'd posit that the only real purpose of the validation is to catch typos in the (optionally) shared field in one's profile. I have no insight as to why it was originally made a mandatory part of the registration.
The length thing is pretty archaic though and I agree should be upped to cover the newer, longer TLDs. I'm personally using the official Swift regex:
[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}
from twitarr.
There's not much point in requiring the e-mail address during registration, other than having it on file in case we want to send out some sort of notification before putting the twitarr archives online post-cruise (which is something we haven't done in a while). We don't confirm the e-mail address for new sign-ups. It could be removed from registration, but I'd rather keep it in.
I do agree that the current regex needs to be fixed or removed. But before changes are made, a consensus on which one to use (or to remove) should be made, and we should use the same one everywhere (if possible).
I do like @grundoon 's suggestion. I can't really pose an alternative, since I'm mostly a .NET guy who does email validation using System.Net.Mail.MailAddress.
from twitarr.
I had to update System.Net.Mail.MailAddress a while back. Validation is a very deep rat hole, especially now that unicode email addresses are going live. Best to keep it a simple "anychars@anychars".
from twitarr.
Is it my lack of regex parsing fu, or does not even the W3C one allow either of my original totally valid addresses... grundoon@[8.8.8.8] or bang path formats?
from twitarr.
I don't believe IPv6 addresses or bang path formats are allowed by the specs these days.
The HTML spec regexp doesn't attempt to support IDN e-mail addresses because the HTML type=email form field is supposed to convert them to punycode.
If we don't really care about the exact syntax, we might want to just allow anything, or anything with a single "@", or something. I don't really mind what we allow, I just noticed that what we require now is not correct. :-) I'll make the client I'm writing locally test against whatever the server tests for.
from twitarr.
Ruby has a built-in email address regexp, URI::MailTo::EMAIL_REGEXP, which is an implementation of the one recommended by the HTML spec. I'm going to switch it to use that - while not perfect, it's better than what we have now.
It's also likely that e-mail address will be removed from registration in the near future. If it is removed from registration, it will be kept on the user profile for anyone who wants to publicize it.
from twitarr.
Related Issues (20)
- IDs for seamails, uploads, etc, are sequential HOT 1
- Error message for overlong hashtag has a typo HOT 1
- Creating a forum with an invalid post still actually creates the forum (just without a post) HOT 1
- Not being able to send a message with a # followed by 101 characters is dubious HOT 1
- Automatic creation and access to Moderator-only seamail thread HOT 1
- /api/v2/event/mine_soon/:minutes should include server time HOT 3
- now thread is created with read_users containing participants other than the creator
- /api/v2/seamail_threads?unread=true returns read messages
- /api/v2/seamail_threads?after=... should include changed threads HOT 2
- Check how /api/v2/time handles non-integer time zones HOT 1
- 500 from /api/v2/forums/1006/1019/react HOT 1
- POST /api/v2/forums/1007/1023/react/like gives 500 HOT 1
- ReactionDetails{} doesn't match spec any more HOT 1
- PhotoDetails.id is now an int, not a string HOT 2
- Emoji being stripped from stream posts HOT 3
- Kraken: Adding a post to an existing forum thread fails HOT 1
- parent_chain in GET /api/v2/stream is now array of int HOT 2
- Hashtag Autocomplete endpoint returns HTTP 500 errors
- Response when un-following an Event lists the event as still Followed
- Hashtag autocompletion returning IDs not hashtag names
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 twitarr.