Posted in Development | Posted on 06-30-2008 | 3,338 views
I ran across an interesting issue with gmail this morning. I was logging into my Broadchoice hosted mail account. Those of you who use Gmail for your hosted mail know that the form looks something like so:
Username:
input text field here
@broadchoice.com
Password:
Note line 3 above. Below the text field for your username is @broadchoice.com, or @yourhost.com. This is implying that you should enter your username only and not the full email address.
Being early in the morning (and still suffering with a sinus infection) I accidentally typed in my full email address. I got an error back stating that my username could not include any symbols or other characters.
Wouldn't it have been nice (and relatively simple) for gmail to say "Your username included the hostname for the account, I'll just strip that out."
Do folks do this? Is this a good idea? I'd be willing to bet that folks do that (by accident) quite a bit.
The only example I know of within my code is for BlogCFC and the comment box. When you add a comment you have the option to enter a URL. I write "http://" in the field so you don't have to worry about entering it in. At the same time, I don't bother validating if the field still reads "http://". It's nicer than forcing the user to delete the field if they have no intention of using it.


I've also used this in city/province fields. If someone fails to enter a state/province in a form, I will just populate it for them if I can figure it out based on the area code in the phone number. I hate sending people back to fix a form if it can be avoided.
Is there a good resource reference that enumerates area codes with state/province. You had a good idea hear. It would be nice to have a common reference to use (e.g., XML file, data table, enum, etc.).
a) google's blogger --> if you go to save or post a new blog entry, it will throw an error saying you have an invalid date/time. Why? Because "AM" is valid but "aM" is not. Really Google, any chance you can have an intern fix that? Or are you going to tell us that you didn't have a problem with it in your usability tests? If not, re-write your tests!
b) Sallie Mae --> they're not the only ones where I've had password issues with but the most recent example. They tell me that my password must be 8-32 characters in length and include a number and upper/lower case (IIRC, something like that). My password has that. Depsite their claims it turns out that it doesn't accept a ")" in my password. I revert to an old school password with those sort of characters and it works. I've had this problem with other sites. First off, there is no reason in 2008 not to accept a * or ( or $ or ! in a password. More so, if those are invalid make sure you tell the user they're invalid. I'm sure they don't see it on the bottom line but think of how many phone calls they get over that.
c) Wells Fargo --> There are some screens on the bill pay that I've ran across where it doesn't think "8/8/08" is valid. It forced me to use "08/08/2008". If it was an application for tracking historical events, I could see the need to specify 2008 instead of 1908. But this is bill pay. You can only make a payment for today or in the future. Wells Fargo, please don't brag about how "great" you are on the internet until you get some programmers that act like engineers and worry more about what their code is doing and how people use it rather than how fancy the code itself is.
There are more. I know I've had the same frustration as what Daniel D said. I've also had some interesting problems at work with some web sites. Our proxy server isn't in the US... it's an odd situation. But some sites have randomly rejected orders despite a US CC and US billing and shipping address (billing and shipping being the same, at that). I know NewEgg's done this in the past. I had LaLa do it to me, too.
Oh, and I'm sure everyone here has ran into Captcha where no matter how carefully you look at the picture and type the letter/number combo you still get it wrong a couple times. I HATE THOSE.
Anywhoooooooo.... I hope that sinus infection gets better soon.
I mean, Ray, you did a mistake, why should the computer suffer? :)
I am joking, but not so much. I think we are still doing things too much on the computers terms and we often forget who was supposed to be the slave...
Phone numbers have 3 fields (Area Code, Phone, Extension) with the phone auto-adding dash if they exclude it.
And one that is really helpful.. Auto-capitalization for name/address info.
A VALID phone number is one you can use to call me. It's 11 digits long here in Switzerland. If form validation forces me to shorten it to 10 digits, my phone number becomes invalid. A VALID address is one you can write on an envelope and I'll get it in the post. My zip code has 4 digits. If form validation forces me to add a random 5th digit to it so it passes a programmer's narrow concept of validation, my postal address is rendered invalid.
I run across this _all_ the time, and so do many of my friends here. It's extremely frustrating, and I've been forced to build up a variety of strategies for dealing with it, because in many cases, web apps render my genuine postal address and genuine phone number invalid.
Surprisingly, one of the _worst_ offenders is Adobe's website. It's impossible for me to enter my correct address or phone number using an English version of Abobe's website. And I've really tried. If I try and fudge the zip code to 5 digits on the US site so it passes validation, it forces me to enter a state from that zip code area, all the while allowing Switzerland as the country selection. I don't speak French or German well enough to use the Swiss site, so the end result is that I cannot buy software directly from Adobe online.
The underlying message that comes across loud and clear is: "If you're too stupid to enter your correct phone number and postal address, we're not going to sell anything to you!" The idiotic thing about this is that I don't _need_ Adobe to call me. They never have. I don't need them to send anything to me in the post. I've already downloaded the trial. I JUST NEED THE KEY SENT TO MY EMAIL ADDRESS SO I CAN UNLOCK THE TRIAL.
I've completely given up on Adobe. It's absolutely impossible for me to be a client of theirs. And this stuff happens all the time to me.
In another case where I needed a validated copy of my birth certificate sent to me, the programmer decided that if the zip code is 4 digits long, a 0 should be prepended to it when it was persisted to make up for the missing digit. I insisted that my zip code was 4 digits long after it didn't pass the first round of validation. I don't know what happened to the country. Apparently, the programmer found a list of country names somewhere and included it as a dropdown in the form so it looked cool. UPS attempted to deliver my birth certificate to a small town in Massachusetts that doesn't exist.
Adobe likely invested many 10's of thousands of dollars of programming time in that sophisticated validation system of theirs. The end result is that I can't get a serial number for Fireworks online. In the end, I needed to find a friend in America who would receive the CD for me in the post, order the CD from Amazon and have it sent to her (Amazon accepts my billing address in Switzerland, Adobe doesn't). She opened it, and sent me the serial number by email. It worked, but I wasn't 100% sure it would, so I had a backup plan in place that she would send me the CD via FedEx if necessary and reimburse her for the cost. The billable time I wasted trying to figure out how to buy a valid copy of Fireworks CS3 _far_ exceeded the purchase price.
It's not only Adobe. I run into problems like this with a surprising number of websites with my address and phone number, many targeted at an international audience. The lesson I've learned from this experience is that a programmer cannot validate a phone number or an address or even an email address as genuinely valid, meaning _my_ phone number where they can reach me, so what is the point of attempting to do so? My phone number is a unique set of 11 digits that CANNOT be anticipated by a validation routine. Programmers should _not_ even try, because they cannot anticipate all the scenarios necessary now and into the future that would allow valid data through their routines. Nor should they set up database data types in such a way that makes unnecessary validation necessary. Phone numbers and zip codes are strings, not numerics, and they have indefinite lengths! Form validation, in my opinion, should be very sparse indeed, and designed from the USER'S perspective!
What's happening to Nando, to touch back on the original post, is the problem a lot of places seem to have with getting business rules correct let alone differentiating between a business rule and a display rule.
In the case of the postal code, there are different rules governing the postal code dependent on the country. For example, if you're in Canada it's going to be 6 characters and at that should be letter-number-letter number-letter-number (or am I flip flopping those?). And like Raymond's original post, the display rules should let you enter that with or without spaces.
However, i think that it would be much more useful of a post if we all got together and consolidated a set of validation rules that we could all get behind that will work for the US and overseas.
Maybe I have missed the boat here, but i am not aware of a place that already lays out the rules for every field in an address/contact form with rules for US, Canada, and elsewhere. If there is such a place, please post a link. If not, lets get started.
SIDENOTE: i decided to test Ray's blog and left off my "http://" in the website to see if it would, kindly, put it in for me.. it did not.. "Your website was not a valid url." sigh.
As I said, my blog is just a bit old compared to the core install.
[Add Comment] [Subscribe to Comments]