|
Skuto posted:This is also a stupid idea if there's a remote possibility the database isn't 100% up to date.
|
# ? Jul 18, 2014 16:40 |
|
|
# ? Jun 8, 2024 02:40 |
|
Subjunctive posted:Validation doesn't have to reject. It can be quite useful to simply warn that you selected US for your country but only have 9 digits in your phone number. I see sites periodically that warn if I mistype my email address as @gmali.com, and it's nice. Man. It would be nice if any site that I've ever used did that rather than just rejecting my email address out of hand.
|
# ? Jul 18, 2014 16:43 |
|
Subjunctive posted:Validation doesn't have to reject. It can be quite useful to simply warn that you selected US for your country but only have 9 digits in your phone number. I see sites periodically that warn if I mistype my email address as @gmali.com, and it's nice. See also https://github.com/mailcheck/mailcheck
|
# ? Jul 18, 2014 16:46 |
|
Skuto posted:That's a decent solution. I'd guess continuously getting warnings "your name is not valid" is annoying, Oh, I wouldn't do it for names. The warning can be a little (/_\) warning triangle and hint next to the entry, rather than another step. At one point we noticed that we were seeing a lot of accounts with obviously fake last names like Supermarket or Facebook (esp in a non-English locale). Turns out that in the region in question (Malaysia? Indonesia?) a lot of people don't have last names, and we required them, so they had to make something up.
|
# ? Jul 18, 2014 16:55 |
|
Holy poo poo I would be livid if every service I gave my phone number to called me to make sure it was a valid phone number what is wrong with you people
|
# ? Jul 18, 2014 16:55 |
|
Steve French posted:Holy poo poo I would be livid if every service I gave my phone number to called me to make sure it was a valid phone number what is wrong with you people Many services send an SMS. (Preferably, unless it's absolutely unavoidably non-negotiably critical the phone number is correct, you shouldn't care and just don't try to verify because who cares anyway)
|
# ? Jul 18, 2014 17:00 |
|
If having a correct phone number is actually important I don't mind a verification SMS, and if it isn't you aren't getting my real phone number anyway.
|
# ? Jul 18, 2014 17:11 |
|
Mandatory entries where it doesn't make sense to the used why they're mandatory is a great way to get a ton of garbage in your database.
|
# ? Jul 18, 2014 17:16 |
|
Skuto posted:Many services send an SMS. Surely you didn't think I was unaware of that. Not all phone numbers can receive SMS messages. More important is the previously made point that in some situations one might be entering a phone number or email address that *isn't yours*. I'm not saying sending an SMS or email is never the right answer, just that it isn't always the right answer. Use your imagination; there are plenty of situations where you might want to make a best-effort check of the validity of a phone number or email address and not actually send anything. There is also no rule that says that if the validation check fails that form submission is blocked; you may simply wish to be helpful to the user and point out a possible fatfingering.
|
# ? Jul 18, 2014 17:21 |
|
Steve French posted:There is also no rule that says that if the validation check fails that form submission is blocked; you may simply wish to be helpful to the user and point out a possible fatfingering. Tell that to everyone else doing input validation
|
# ? Jul 18, 2014 17:33 |
|
I'd rather tell you that you're missing the point.
|
# ? Jul 18, 2014 17:36 |
I like the idea of "hey we weren't able to validate your thing, please double check to make sure it's correct and we'll let it pass" the best.
|
|
# ? Jul 18, 2014 17:38 |
|
I don't see why you need to have any code that tries to determine if a postal address is valid; just mail them something.
|
# ? Jul 18, 2014 17:42 |
|
Steve French posted:I don't see why you need to have any code that tries to determine if a postal address is valid; just mail them something. Ever tried verifying PayPal? BTW, given that the entire point of the discussion was that trying to verify things (with code) is stupid, I hope you're not seriously advocating trying to validate postal addresses by code - rather than just accepting the input and STFU - because by now I do hope you're the only one who thinks that's a sane idea.
|
# ? Jul 18, 2014 17:52 |
|
Skuto posted:Ever tried verifying PayPal? man thats the second sarcastic post in this thread you've failed to get
|
# ? Jul 18, 2014 17:55 |
|
Holy crap how are you guys still really mad about phone numbers?
|
# ? Jul 18, 2014 18:06 |
|
Suspicious Dish posted:Holy crap how are you guys still really mad about phone numbers? <RED EXCLAMATION MARK> That's not a valid name/phone/number/address/argument/post, please resubmit.
|
# ? Jul 18, 2014 18:07 |
|
Skuto posted:I hope you're not seriously advocating trying to validate postal addresses by code - rather than just accepting the input and STFU I hope you never have to write sales tax code for a jurisdiction that requires the tax be levied based on where the buyer lives. Not just postal code, not just city, not just street, but the complete address can end up mattering, and it all has to be correct the first time. The real horror is that you can move one house down on the same street in the same city and change sales tax districts. gently caress Washington state.
|
# ? Jul 18, 2014 18:13 |
|
Um excuse me I'm the smartest programmer so I need the last word thanks.
|
# ? Jul 18, 2014 18:14 |
|
But guys. Like. What is "valid?"
|
# ? Jul 18, 2014 18:51 |
|
Skuto posted:Scales well for international websites. And tell me, does it work for extensions too in the USA? Validation is hard and easy to argue about, but once you get over good/bad or smart/stupid you come to a real philosophical difference about where to place the mental effort on turning input data into something useful: do you do that at data entry time, or when reading the data? Generally when we're talking about validation that means we care about the former case, so it's much more important to reject malformed input and force users to figure out how to correctly form their input to meet requirements (or call support) than it is to let them type their phone number in their preferred form. Sometimes the latter case is true, like if your call center agents are filling out tickets you probably don't want any input validation on the phone number field, except maybe non-empty.
|
# ? Jul 18, 2014 19:21 |
Mogomra posted:But guys. Like. What is "valid?" Not your posts
|
|
# ? Jul 18, 2014 19:47 |
|
McGlockenshire posted:I hope you never have to write sales tax code for a jurisdiction that requires the tax be levied based on where the buyer lives. Not just postal code, not just city, not just street, but the complete address can end up mattering, and it all has to be correct the first time. Just gotta establish a subsidiary entirely outside of Washington which handles sales to Washington customers and then tell them they're responsible for paying use tax themselves.
|
# ? Jul 18, 2014 19:48 |
|
quote:I hope you never have to write sales tax code That makes two of us. quote:gently caress Washington state. Realistically once you get to the point where you need different tax rules per state, you're either limited to a specific geographical areas where your odds of getting it correct are higher (but you'll probably still get it wrong occasionally). If you code something that works well internationally, that's a business in itself. Alereon posted:Just a note, this actually does scale internationally because they had this figured out about 5 years ago. You can even get real-time number portability data for most countries you wouldn't expect, for qualifying uses. Sounds useful. I don't think I've encountered this. Most stuff you meet seems to fall either under the "the number is important, and we'll send an SMS to verify" or "lol no way you're getting my real phone number please pretend this random sequence of US-style phone number digits is real". SMS seems less common in the USA, but then again you seem to have a more uniform or at least standardized numbering system. quote:where to place the mental effort on turning input data into something useful: do you do that at data entry time, or when reading the data? Depends on the usage. If you're collecting stats (or calculating taxes) for example, you can look at what you need to know and what data will be valid where you're interested. If you need to ship something somewhere, and you require a county field or a zip code, you're bad. If you have no actual need for an address and still ask for those things, expletives are warranted. If you're validating input because you don't know what a stored procedure is but you've heard of Bobby Tables, you're a lost cause. (Hi Adobe!)
|
# ? Jul 18, 2014 19:56 |
|
McGlockenshire posted:I hope you never have to write sales tax code for a jurisdiction that requires the tax be levied based on where the buyer lives. Not just postal code, not just city, not just street, but the complete address can end up mattering, and it all has to be correct the first time. This works for the insurance industry too.
|
# ? Jul 18, 2014 19:56 |
|
At the place where I work, one of the guys who designs GUIs uses red boxes where everyone else would be using green. As in, red status boxes displaying the word "OKAY" when a system is okay. He's not color blind, just likes the color red. If a system is in an error state, the box is red for that, too. If a system is in a warning state or something then it's yellow
|
# ? Jul 18, 2014 21:40 |
|
QuarkJets posted:At the place where I work, one of the guys who designs GUIs uses red boxes where everyone else would be using green. As in, red status boxes displaying the word "OKAY" when a system is okay. He's not color blind, just likes the color red. If a system is in an error state, the box is red for that, too. If a system is in a warning state or something then it's yellow If he were colorblind, he'd know not to use color as the sole indicator of status. I'm colorblind and it drives me insane. I can't see every shade of red or green, and a lot of dark reds look black unless I'm looking really closely.
|
# ? Jul 18, 2014 21:49 |
|
Suspicious Dish posted:Holy crap how are you guys still really mad about phone numbers? Don't get me started about Telex.
|
# ? Jul 18, 2014 22:23 |
|
Subjunctive posted:Don't get me started about Telex. You can test it but it will not fail?
|
# ? Jul 18, 2014 23:21 |
|
lol if you don't automatically validate every phone number that gets put into your system by calling them with twilio and making them solve a quiz over the phone (in case they're a robot phone)
|
# ? Jul 18, 2014 23:57 |
|
Subjunctive posted:Don't get me started about Telex. no keep going. assuming by telex you mean: https://www.youtube.com/watch?v=BqsHNEuaSCI e: whoa that video is way more than i expected
|
# ? Jul 19, 2014 00:16 |
|
Subjunctive posted:Don't get me started about Telex. OK, I won't. Thanks for the heads up!
|
# ? Jul 19, 2014 02:09 |
|
Soricidus posted:Email address validation with a regex doesn't get you anything. It's very likely you'll reject valid addresses, and likewise it's very likely users will input "valid" addresses that have typos in them. The way to validate an email address is to accept whatever the gently caress the user types and then send it an email with a validation link in it. Yeah, I've had valid email addresses rejected in some rather highbrow sites. I had a university email address that was formatted first.m.last@university.edu and Amazon wouldn't let me register that for Amazon Student. Not exactly a weird scheme for an educational email address. It wasn't the first time that happened, either, at one point I got fed up and asked the university to change to first.last but no dice, ADDRESSES ARE WHAT THEY ARE Gmail +tag filtering sounded really cool until I realized that the number of sites that accept those email addresses as valid can be counted on one hand. I really wish more programmers would just take that advice. Filter any escape characters, send a validation email, if the link gets clicked it's valid, end of story. Paul MaudDib fucked around with this message at 20:47 on Jul 19, 2014 |
# ? Jul 19, 2014 19:50 |
|
Paul MaudDib posted:Gmail +tag filtering sounded really cool until I realized that the number of sites that accept those email addresses as valid can be counted on one hand. I have a custom domain with wildcard forwarding to my gmail account and I've found a few sites that won't allow their name in an email address. Ie: foobar.com rejects foobar@hughlander.com
|
# ? Jul 19, 2014 22:16 |
|
Paul MaudDib posted:Yeah, I've had valid email addresses rejected in some rather highbrow sites. I had a university email address that was formatted first.m.last@university.edu and Amazon wouldn't let me register that for Amazon Student. Not exactly a weird scheme for an educational email address. It wasn't the first time that happened, either, at one point I got fed up and asked the university to change to first.last but no dice, ADDRESSES ARE WHAT THEY ARE Did you ever contact Amazon? It seems like a needlessly specific requirement.
|
# ? Jul 20, 2014 01:48 |
|
Hughlander posted:I have a custom domain with wildcard forwarding to my gmail account and I've found a few sites that won't allow their name in an email address. Ie: foobar.com rejects foobar@hughlander.com Catch-alls are the best thing ever given how many websites hate + aliases. I have been lucky enough not to encounter this issue (yet).
|
# ? Jul 20, 2014 04:04 |
|
Hughlander posted:I have a custom domain with wildcard forwarding to my gmail account and I've found a few sites that won't allow their name in an email address. Ie: foobar.com rejects foobar@hughlander.com This is probably a regex attempting to prevent people from getting their own registration system to email bomb themselves.
|
# ? Jul 20, 2014 08:45 |
|
Volmarias posted:Did you ever contact Amazon? It seems like a needlessly specific requirement. Yeah, they fixed it within a week or two (circa 2010)
|
# ? Jul 21, 2014 00:22 |
|
Address validation is even worse, I had to enter a town name into an online form I tried to enter the Town Name : Münster Invalid Address : Can only contain Alpha Characters I cant Put Munster as that is a different town in a different Country.... FAIL......
|
# ? Jul 21, 2014 07:08 |
|
|
# ? Jun 8, 2024 02:40 |
|
TheresaJayne posted:Address validation is even worse, My brother was born in a city which has since changed its name, in a territory which has since changed its name. He sometimes runs into the problem of a system asking for his birthplace, then rejecting it as an actual location.
|
# ? Jul 21, 2014 08:17 |