Web programming tip of the day

Helpful programming tip of the day. Brought to you by the letter dumb and, today, by the MyRogers Change Your Contact Information secure online form.

Let’s suggest you have a common webform that accepts addresses including standard Canadian postal codes. Lets assume your database only accepts postal codes in some format, say, xxxyyy as opposed to another other commonly used variation such as xxx yyy (with a space in the middle).

Algorithm Suggestions:

10 Accept postal code
20 Does postal code have a space in it?
30 if yes, 
     
     Link Style="font-color:RED; set-tone:vaguely-indignant; 
     Print err423: "The format of the Postal Code entered is invalid. 
                    Please ensure that the Postal Code entered is 
                    correct and try again." 

     remove extra space

40 Store postal code to database
This entry was posted in Archive, humanfactors, postalcode, rogers, useability. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *