5 ms·
Sorry, right now I don't think we have a good way to validate international phone numbers, we should fix that soon. The email refusing "+" was because of a crap
by justin 15y ago
Sorry, right now I don't think we have a good way to validate international phone numbers, we should fix that soon. The email refusing "+" was because of a crappy lib that I was using, and it isn't terribly high on the list of things to fix.
So, I guess the real answer is that it is restrictive because that was what was easiest.. sorry :(
- baq 15y agofyi: see itu-t e.123 for standardized phone number notation: http://www.itu.int/rec/T-REC-E.123-200102-I/e http://www.itu.int/rec/T-REC-E.123-200102-I/e
- clavalle 15y agoHere is some handy regex: /^([\w\!\#$\%\&\'\\+\-\/\=\?\^\`{\|\}\~]+\.)[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i
- icebraining 15y agoApparently, you need something like this to fully comply with the RFC: http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html Or you can just do some basic checks and verify it by sending an actual email.
- duaneb 15y agoOr just check for an @ symbol and use confirmation email.
- nullflux 15y agoMX/A records can be useful for this as well.
- wging 15y agoIt's worth hesitating before introducing a confirmation-email step. You're certainly going to lose people every time you increase the complexity of the signup process.
- Uchikoma 15y agoIn some countries (EU?) you're required to do a confirmation-email step.
- fizx 15y agoAlso, libphonenumber from google works.
- buro9 15y ago2nd this. You shouldn't need to worry about phone numbers, just use libphonenumber and you're done.