Recently, Marc came upon a dilemma that all car owners can relate to - his next oil change was due soon.
Hoping to take advantage of Midas' online appointment scheduler, he found his nearest Midas garage at http://midaslocator.com/ and started entering his information. Unfortunately, when it came time enter his address information, Marc noticed something peculiar - the form validation wouldn't accept his zip code, or any zip code for that matter.
Viewing the source of the page, he discovered this line containing the regular expression being used to validate zip codes:
dnn_ctr685_UIComponentInjector_ctl00_ZipPostalCodeRegEx.validationexpression ="(^d{5}(-d{4})?$)|(^[ABCEGHJKLMNPRSTVXY|abcdeghjklmnprstvxy][0-9][A-Z|a-z](-)?( )?[0-9][A-Z|a-z][0-9]$)";
As it turned out, the script was using 'd' instead of '\d' to denote a number...however, this didn't change the fact that the zip code is a required field.
The work around?
After entering 'ddddd' for his zip code, Marc was able to successfully schedule an oil change.