• (cs) in reply to PiisAWheeL
    PiisAWheeL:
    On a side note, does that mean I have successfully Trolled Nagesh?
    Yes, but Nagesh has been off his game lately. Notice that his latest posts don't have any spelling or grammar mistakes.
  • (cs) in reply to PedanticCurmudgeon
    PedanticCurmudgeon:
    PiisAWheeL:
    On a side note, does that mean I have successfully Trolled Nagesh?
    Yes, but Nagesh has been off his game lately. Notice that his latest posts don't have any spelling or grammar mistakes.
    So its like picking on the special kids that ride the short bus: I'v won... but have I really won?
  • null (unregistered) in reply to PiisAWheeL
    PiisAWheeL:
    Nagesh:
    PiisAWheeL:
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.

    No zip code bull crap.

    I know you ride a camel to work. You don't gotta lie to kick it.

    I bow to your supreme knowledge of geography, Jahanpanah! Tussi great ho! Camels are part of Rajasthan not Andhra Pradesh, you buffoon!

    Hey hey hey! My ignorance began the moment I hit the border. Its all India. Camels are used. And you are Nagesh... The shining example of Indian stereotypes. Why are you in such a bad mood? Camel break down?

    On a side note, does that mean I have successfully Trolled Nagesh?

    His bad mood is the direct result of a few people telling him that his jokes are not funny and the power outage they are currently experiencing there.

  • Freddy (unregistered) in reply to Chelloveck
    Chelloveck:
    Brad:
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.

    The ones which really grind me are digit-only phone number and credit card fields. Really, can't the programmer figure out how how strip non-digits out of a text string so I can enter '(123)456-7890' or '1234 5678 9012 3456'?

    The propaganda from a data matching suite we use (quite rightly) suggests that data should be stored as unfiltered as possible, to allow you to consistently match how people enter the same data rather than how you have used it in several different places. That is, let the users enter whatever they want, store it as such, and try to mould it into whatever format you want when you actually use it.

    Additionally, Client Side validation simply requires users to enter more realistic-looking data which is harder to discern from real data.

    Example: I have an unvalidated form that I need to fill in:

    Name: Fuck Off
    Email Address: Not today
    Zip Code: Nope
    Phone: Blah
    

    vs the Validated form

    Name: Fuck Off
    Email Address: [email protected]
    Zip Code: 55416
    Phone: 555 1234
    

    A human can see both of these are likely bodge, but because the computer has forced the 2nd to be in a format it considers valid, it can't see that it's a crock.

    The only time the user needs a response like "invalid zip code/phone number" is if they would be expecting an immediate response. If (as is usually the case) they are sending feedback or subscribing to something, you let them think everything is hunky dory and can choose whether to pay attention to their rubbish or not....but this is a decision that is made at the time the data is used not at the time the data is entered....

  • Mile (unregistered) in reply to Anonymous.
    Anonymous.:
    Two observations.
    1. I don't know if this got fixed since the story went live or the code varies for different browsers, Midas locations, etc, but I've checked appointment booking pages for two locations next to me and they both contained regexp's starting with "(^[0-9]{5}(-[0-9]{4})", not "(^d{5}(-d{4})".

    2. I'm not familiar with modern web development tools, but that code did not look to me like it was written by a person. Maybe the regexp was somehow autogenerated too? What would the original human programmer input look like? Any experts here?

    for the Zip Code or the Phnone Numbrero?

  • Kim (unregistered)

    For shame,

    Noone has yet mentioned "You Midas well have the best".

  • bambam (unregistered) in reply to AN AMAZING CODER

    Yeah, its really time consuming to unscrew a bolt and filter, screw them back on, and dump some oil in.

  • consequat (unregistered) in reply to OccupyWallStreet
    OccupyWallStreet:
    It's one of the nicer things with Chrome - you can easily manipulate the stuff live and make changes. I'm sure firefox can do it, but I haven't figured out how.
    You do it by installing Firebug.

    Also, as usual, Opera could already edit pages live before "Inspect Element" was even invented.

  • SG_01 (unregistered)

    Also interesting how |0|1|1 is also a valid zip-code... I've never seen zip-codes with pipe symbols before ^^

  • (cs)

    I'm betting the compiler complained that "\d" wasn't a valid escape code. The fix for that is to remove the "" of course!

  • foxyshadis (unregistered) in reply to null
    null:
    Chelloveck:
    I was really impressed to learn that the postal barcode you see on letters (in the USA, anyway) contains a planet code. "Wow, that's some really progressive future-proofing!" I thought. Imagine my disappointment when I learned that it was something quite more mundane than sending postcards to Mars.

    the 'planet' you are referring to is actually an acronym PLANET that stands for: 'Postal Alpha Numeric Encoding Technique' and encodes digits 0-9 much as the now deprecated POSTNET (i.e. also an acronym and not a planet, or a galaxy, or a black hole) did.

    CAPTCHA: EARTH is a Planet; PLANET is an acronym

    Whoosh.

    (Thank you for regurgitating Wikipedia, you get a B+ on your 3rd grade book report.)

  • mx (unregistered) in reply to Severity One

    luxembourg?

    and my comment is not (that much) spam... akismet!

  • Andrew (unregistered)

    actually there's two parts to that regex. "a0a0a0" would also work.

    broken down into words, the entire regexp is:

    5 d's at the start of the string followed by an option hyphen and 4 d's at the end of the string.

    or

    any letter at the start of the string, followed by a numeral, followed by any letter, followed optionally by a hyphen, followed optionally by a space, followed by a non-optional numeral, followed by any letter, followed by any numeral at the end of the string.

  • Anonymous. (unregistered) in reply to Mile
    Mile:
    Anonymous.:
    Two observations.
    1. I don't know if this got fixed since the story went live or the code varies for different browsers, Midas locations, etc, but I've checked appointment booking pages for two locations next to me and they both contained regexp's starting with "(^[0-9]{5}(-[0-9]{4})", not "(^d{5}(-d{4})".

    2. I'm not familiar with modern web development tools, but that code did not look to me like it was written by a person. Maybe the regexp was somehow autogenerated too? What would the original human programmer input look like? Any experts here?

    for the Zip Code or the Phnone Numbrero?

    dnn_ctr685_UIComponentInjector_ctl00_ZipPostalCodeRegEx.validationexpression = "(^[0-9]{5}(-[0-9]{4})?$)|(^[ABCEGHJKLMNPRSTVXY|abcdeghjklmnprstvxy][0-9]A-Z|a-z?( )?[0-9][A-Z|a-z][0-9]$)";

  • (cs) in reply to Chelloveck

    My total peeve is when my bank will not accept as input my account number ENTERED EXACTLY AS THEY DISPLAY IT THEMSELVES. You show it with hyphens, you should accept it with hyphens.

  • (cs)

    TRWTF is ASP.NET, which is what the site uses.

  • (cs) in reply to a cursive recronym
    a cursive recronym:
    Severity One:
    Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.
    Go back to your side of the Atlantic, Lëtzebuergian, and take your funny ümlauts with you! ;-)
    Bit more south. :)
  • TheSHEEEP (unregistered) in reply to Severity One
    Severity One:
    In fact, the hλlf-wits at Valve insist to this very day that I fill in a state, which I dutifully fill in as 'n/a'. Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.

    Pfff.... just get annected by next biggest neighbor and be done with that attitude. It's fun! Ask Tibet!

  • (cs) in reply to Nagesh
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.
    And provided you live in the half of the country that actually has electric power.
  • Full of Gas (unregistered) in reply to Severity One
    Severity One:
    Ah, zip codes. Sometimes I long for those days where you could enter an international address on site from an American company, but you still needed to provide a zip code. And a state.

    Many gas stations in the U.S. allow you to pay by credit card if you enter a zip code which is annoying for foreigners. The attendants don't seem to understand why you might want to pay by card but not at the pump...

    One day I decided to try a zip code of 00000 - and it worked. I chose not to think too hard about that.

  • (cs) in reply to herby
    herby:
    Ross Presser:
    Who needs IPv6? Let's just give every device a post code!
    Wrong! Who needs post code? Give every house an IPv6 address.
    Pfft, old news. http://tools.ietf.org/rfc/rfc1606.txt
  • someone (unregistered)

    ahh, the "code" was written in a WYSIWTF IDE

  • A (unregistered) in reply to OldCoder
    OldCoder:
    dignissim:
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?
    My bet would be more on Malta.
    Almost certainly Iceland.

    Seeing as Iceland the population of Iceland is 320 000, not 420 000, it's almost certainly not Iceland.

  • (cs)

    according to http://www.worldatlas.com/aatlas/populations/ctypopls.htm

    the country with the population closest to 420K is Malta.

  • (cs) in reply to dignissim
    dignissim:
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?
    My bet would be more on Malta.
    Bingo. Most densely populated country in Europe (after Monaco Gibraltar and Vatican City, but those are city states), most densely populated non-coastal island in the world, and fifth highest number of vehicles per capita in the world. So you can imagine that finding where to park is a bit of a problem.

    I doubt, though, that each parking space would have its own postal code, particularly because mail is not usually delivered to parking spots.

  • Some Jerk (unregistered) in reply to lucidfox
    lucidfox:
    TRWTF is ASP.NET, which is what the site uses.

    the true WTF is that people are stupid enough to say things like this.

  • Blue Collar (unregistered)

    The real WTF is that the guy is going to Midas.

  • M.M Lee (unregistered) in reply to Severity One

    We don't (even) need no feelthy steenking cities.

    Here in "Disneyland with the death penalty" we are tired of the world (not to mention it's dog)'s insistence that we enter Country = Singapore State = Singapore City = Singapore

    (oh, and with one 70th of the population of 'murka, we apperently need one more digit in our zip codes, which is probably similar to their being enough IPV6 addresses to give one to every star in the universe (aka, my as shas its own zip code))

  • (cs) in reply to bambam
    bambam:
    Yeah, its really time consuming to unscrew a bolt and filter, screw them back on, and dump some oil in.
    Actually most shops lose money on oil changes. The oil change is where a mechanic can put the vehicle on the lift and inspect it for other problems. How are your brakes and pads? CV boots torn anywhere? etc. The shop then brings these items up to the customer when they come back for their vehicle (or after a list has been made, if the customer is in the waiting room), to see if the shop can sell the customer more work (and keep their car properly maintained).
  • Zippy Coder (unregistered) in reply to Severity One

    I once came across a site which used 000+[country dialing code] (or 00+[country dialing code]), i.e. 00044 for the UK, for non-US locations, so I now try this every-time I need to enter a ZIP code.

    If they don't accept that (as often they will not), I use the one zip code most people outside the US will have heard of... 90210.

  • Evan (unregistered) in reply to AndyCanfield
    AndyCanfield:
    My total peeve is when my bank will not accept as input my account number ENTERED EXACTLY AS THEY DISPLAY IT THEMSELVES. You show it with hyphens, you should accept it with hyphens.
    But filtering out hyphens from the input string is so haaaard!
  • Jay (unregistered) in reply to OccupyWallStreet
    OccupyWallStreet:
    pantsman:
    TRWTF is entering 'ddddd' instead of just disabling JavaScript.

    That doesn't work if the form requires javascript to submit it. Some onSubmit handlers work that way, annoyingly. Other forms require it or other form things break, horrendously.

    It's one of the nicer things with Chrome - you can easily manipulate the stuff live and make changes. I'm sure firefox can do it, but I haven't figured out how.

    Yeah to point 1. Unless you've studied the code, you have no idea what the Javascript does. It may just do some validations that aren't needed if you manually insure that there are no errors ... or it may be massaging the data in any number of ways before submitting the form, doing Ajax calls that fire related updates, etc etc.

    As to point 2: You could always copy the web page (and any attached script files, style sheets, etc) to your local drive, study the Javascript, and edit it to fix the errors. But wow, that sounds like a lot of work just to submit an order. Before you can order their products, you have to debug their ordering system?

  • Mozzis (unregistered) in reply to null

    So instead of being far-sighted, it is short-sighted; now the USPS won't be able to have a planet code in snailmail barcodes without creating mass confusion. No wonder the mail to Ceres never arrives on time!

  • Jay (unregistered) in reply to Freddy
    Freddy:
    Chelloveck:
    Brad:
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.

    The ones which really grind me are digit-only phone number and credit card fields. Really, can't the programmer figure out how how strip non-digits out of a text string so I can enter '(123)456-7890' or '1234 5678 9012 3456'?

    The propaganda from a data matching suite we use (quite rightly) suggests that data should be stored as unfiltered as possible, to allow you to consistently match how people enter the same data rather than how you have used it in several different places. That is, let the users enter whatever they want, store it as such, and try to mould it into whatever format you want when you actually use it.

    Additionally, Client Side validation simply requires users to enter more realistic-looking data which is harder to discern from real data.

    Example: I have an unvalidated form that I need to fill in:

    Name: Fuck Off
    Email Address: Not today
    Zip Code: Nope
    Phone: Blah
    

    vs the Validated form

    Name: Fuck Off
    Email Address: [email protected]
    Zip Code: 55416
    Phone: 555 1234
    

    A human can see both of these are likely bodge, but because the computer has forced the 2nd to be in a format it considers valid, it can't see that it's a crock.

    The only time the user needs a response like "invalid zip code/phone number" is if they would be expecting an immediate response. If (as is usually the case) they are sending feedback or subscribing to something, you let them think everything is hunky dory and can choose whether to pay attention to their rubbish or not....but this is a decision that is made at the time the data is used not at the time the data is entered....

    Hmm. So if the user's phone number is, say 123-555-9876, but he slips on the key entering it and it comes in as 123-555-986, you want to just accept it without warning, and somehow figure it out later? How? How do you find what the missing digit was? Okay, maybe you don't really need the phone number. But in that case, why did you ask for it? I think we can safely assume that at least SOME of the data requested on a form is required.

    Of course a format validation will not prevent all possible errors. If someone's zip code is 12345 and they accidentally type 12346, a format check won't catch that. But a format check will catch SOME errors, and some is better than none.

  • Jay (unregistered)

    Oh, follow-up to my previous post.

    You talk as if the only point of data validation is to distinguish serious entries from spam. I can certainly understand the desire to filter out spam. But presumably the main point of, say, an order processing system, is to GET ORDERS so that we can collect money and ship merchandise. It's not enough to determine that an order is indeed a real order and not spam. We'd also like to collect enough information so we can actually get their money, and if we don't want to be forced to refund their money, we probably need to collect enough information to actually ship the merchandise the customer wanted.

    So sure, if someone types in "up yours" as a credit card number, then if we just accepted it, the jokester will have his laugh and we can safely disregard the order. but if someone types in a credit card number that doesn't have the right number of digits or doesn't pass the check-digit rule, it's quite likely that this was just a typing mistake and not spam. In that case, it seems like a good idea to alert the user that the credit card number entered is invalid so he can fix it, rather than just accepting it and later saying, Oh well, invalid credit card number, I guess we'll just throw away that order.

  • (cs) in reply to Severity One

    It may surprise you, but you DO live in a state. What the hell to you think a country/nation is?

    God, when will we get some educated people on this board?

  • Jay (unregistered) in reply to M.M Lee
    M.M Lee:
    We don't (even) need no feelthy steenking cities.

    Here in "Disneyland with the death penalty" we are tired of the world (not to mention it's dog)'s insistence that we enter Country = Singapore State = Singapore City = Singapore

    (oh, and with one 70th of the population of 'murka, we apperently need one more digit in our zip codes, which is probably similar to their being enough IPV6 addresses to give one to every star in the universe (aka, my as shas its own zip code))

    On the slightly serious side: Does anyone know why the IPv6 space is so huge? I mean, I can understand wanting to give plenty of room for future expansion and allowing for some dead space because we want to give out numbers in blocks. But with 6 billion or so people in the world, even if every person had 1000 devices, that would make 6 trillion, which would require ... quick calculation here ... 34 bits. So round it up to 40 to make an even 5 bytes. Or round it up to 48 to make an even 6 bytes. Even round it up to 64 so it takes up a long integer as defined in many languages. But 128? Isn't that rather a lot of overkill?

    Hey, quick calculation: There are 6e23 molecules per mole. Say the average person weighs maybe 80 kg. People are mostly water (over 90% I think I've read), which is 18 grams/mole, most other stuff in a person would be heavier, so conservatively a typical person should be less than 80,000 / 18 ~= 4,400 moles. 4,400 moles * 6e23 molecules/mole = 2.6e27 molecules. Times 6e9 people means there are about 1.6e37 molecules of people in the world. IPv6 address space is 3.4e38. So the IPv6 address space is big enough to give a separate IP address to every molecule in the body of every person in the world! That would still have 95% of the space free to accomodate future population growth, beings from other planets, etc.

  • Agention (unregistered) in reply to Jay
    Jay:
    ...So the IPv6 address space is big enough to give a separate IP address to every molecule in the body of every person in the world!

    Just the kind of thinking I'd think from a small-minded baryonic-matter-supremacist race.

  • Shea (unregistered)

    THERE! The page IS working. One guy got through it.

    I'ma go play some Crysis now.

  • Krupuk (unregistered) in reply to Severity One

    Living too in a country with only 500,000 inhabitants, we have postal codes for every street (not only per city).

    I remember registering at an american site where I had to fill in my address. You could either select your city or type in your zip code. I selected my hometown and it automatically filled in a code, I had never seen. I looked it up and it sure was the postal code of a street in my town. They apparently had randomly selected a street and copied its zip code, mistaken it for the entire city's code. So my address now had a wrong zip code. I changed it to the real one, but the system didn't want to accept it, because it didn't match their code for the town. I checked other towns and they sure only had 10 zip codes for the 10 towns in their database.

    We even have a few streets (with more than 500 houses) that have 2 zip codes! One for the even numbered side and one for the odd numbered one.

  • (cs) in reply to Krupuk

    Yeah, that's pretty normal. What many people in a country with low-granularity postal/zip codes often don't realise, is that postal codes are no longer really necessary to deliver mail (as the Irish found out, mentioned earlier), but they do have demographic information attached. And you can buy, and more importantly, sell this information.

    So with my last address in the Netherlands, with postal code 1083 CZ, not only can you see that it's in Amsterdam, but also that it's in an affluent neighbourhood (in Google Earth/Maps, there's actually an Audi R8 parked in front of the flat), although not nearly as affluent as the apartment block next to it. This means that you can really target your advertising, for example.

    Phone numbers is another one. Quite a few sites insist that you fill in an area code. Cool, but area codes with mobile phones are useless (and we don't even have a landline any longer), and in this country we just have eight digits and that's it.

  • (cs) in reply to Severity One
    Severity One:
    And provided you live in the half of the country that actually has electric power.

    One more thing India inherited from its former colonial boss, apparently.

  • (cs) in reply to Full of Gas
    Full of Gas:
    if you enter a zip code which is annoying for foreigners.

    Damn foreigners. Where do they get off being annoyed at zip codes?

  • Josh Einstein (unregistered)

    The real WTF is taking your car to Midas for an oil change.

  • Chris (unregistered) in reply to Severity One

    Severity One : "Phone numbers is another one. Quite a few sites insist that you fill in an area code. Cool, but area codes with mobile phones are useless (and we don't even have a landline any longer), and in this country we just have eight digits and that's it."

    That one will go right over the head of most Yankees. They still have landline area codes to their mobiles.

  • Stefan Andersson (unregistered)

    http://midastucson.com/MidasLocatorV2/TestingPage/tabid/198/language/en-US/Default.aspx

  • Blinkin The Misanthropic IT Gremlin (unregistered) in reply to Severity One

    To be fair, US postal codes get specific down to individual houses as well (though I recently found out the same is not true for apartment dwellings; they seem to be grouped within apartment buildings). The "ZIP + 4" specifies the area postal code and the specific physical location code. Very few online forms require the ZIP + 4 however, tending to only use the 5 digit ZIP. Shipping services, UPS, FedEx, and the USPS, will typically auto-fill the succeeding 4 digits of the full ZIP based on what you enter for a street address.

  • Sanity (unregistered)

    Alternate solution: Ctrl+shift+J and paste ' dnn_ctr685_UIComponentInjector_ctl00_ZipPostalCodeRegEx.validationexpression = ".*";' into the console, then type whatever zipcode you want.

Leave a comment on “Midaslocator.com Zip Codddde Validation”

Log In or post as a guest

Replying to comment #:

« Return to Article