Form Errors – Validating phone numbers and the importance of hand testing


( ! ) Warning: mysql_get_server_info(): Access denied for user ''@'localhost' (using password: NO) in /home/forge/nickdenardis.com/public/wp-content/plugins/xml-google-maps/xmlgooglemaps_dbfunctions.php on line 10
Call Stack
#TimeMemoryFunctionLocation
10.0001231288{main}( ).../index.php:0
20.0001231744require( '/home/forge/nickdenardis.com/public/wp-blog-header.php' ).../index.php:17
30.05002739512require_once( '/home/forge/nickdenardis.com/public/wp-includes/template-loader.php' ).../wp-blog-header.php:16
40.05122747120include( '/home/forge/nickdenardis.com/public/wp-content/themes/nickdenardis-2/single.php' ).../template-loader.php:74
50.07022894456get_template_part( ).../single.php:8
60.07022895344locate_template( ).../general-template.php:171
70.07022895496load_template( ).../template.php:477
80.07032907960require( '/home/forge/nickdenardis.com/public/wp-content/themes/nickdenardis-2/includes/loop.php' ).../template.php:503
90.07592912424the_content( ).../loop.php:18
100.07592915920apply_filters( ).../post-template.php:230
110.07612923400call_user_func_array:{/home/forge/nickdenardis.com/public/wp-includes/plugin.php:213} ( ).../plugin.php:213
120.07612923528xmlgooglemaps_converter( ).../plugin.php:213
130.07612923648xmlgooglemaps_dbfunctions::install( ).../xmlgooglemaps.php:53
140.07612923744mysql_get_server_info ( ).../xmlgooglemaps_dbfunctions.php:10

( ! ) Warning: mysql_get_server_info(): A link to the server could not be established in /home/forge/nickdenardis.com/public/wp-content/plugins/xml-google-maps/xmlgooglemaps_dbfunctions.php on line 10
Call Stack
#TimeMemoryFunctionLocation
10.0001231288{main}( ).../index.php:0
20.0001231744require( '/home/forge/nickdenardis.com/public/wp-blog-header.php' ).../index.php:17
30.05002739512require_once( '/home/forge/nickdenardis.com/public/wp-includes/template-loader.php' ).../wp-blog-header.php:16
40.05122747120include( '/home/forge/nickdenardis.com/public/wp-content/themes/nickdenardis-2/single.php' ).../template-loader.php:74
50.07022894456get_template_part( ).../single.php:8
60.07022895344locate_template( ).../general-template.php:171
70.07022895496load_template( ).../template.php:477
80.07032907960require( '/home/forge/nickdenardis.com/public/wp-content/themes/nickdenardis-2/includes/loop.php' ).../template.php:503
90.07592912424the_content( ).../loop.php:18
100.07592915920apply_filters( ).../post-template.php:230
110.07612923400call_user_func_array:{/home/forge/nickdenardis.com/public/wp-includes/plugin.php:213} ( ).../plugin.php:213
120.07612923528xmlgooglemaps_converter( ).../plugin.php:213
130.07612923648xmlgooglemaps_dbfunctions::install( ).../xmlgooglemaps.php:53
140.07612923744mysql_get_server_info ( ).../xmlgooglemaps_dbfunctions.php:10

Nothing replaces hand testing forms

I fill out a lot of forms during the day, some on existing sites and others as new internal forms that need review. When testing I have a habit of submitting forms with every error combination possible. I know there are automated tools for this but nothing beats seeing it from the users prospective. It is different to run a command line tool and get a number of fails and successes as it is to spend 2 minutes to fill in a bunch of fields and get some weird screen state, odd colors or wording that doesn’t make sense.

That is exactly what is happening above. I clearly filled out the form to my best understanding and still got an error.

Things I notice about this error:

  1. There is something wrong with these three fields, but it doesn’t point out which one(s)
  2. The wording of the error forces me to look up and then scan down to see where the field is
  3. In my mind I did place the area code in the phone field
  4. There is no explanation of the preferred format for the phone number

After understanding that my method isn’t working and they were not going to automatically transform my format to their preferred format I tried every phone number combination I could think of. In the end none of them worked. Being the curious person I am I ended up digging through their validation javascript and found this regular expression it was validating against:

^((\\(\\d{3}\\) ?)|(\\d{3}[-\\s]))?\\d{3}[-\\s]\\d{4}$

Doing a little more investigation I found that it didn’t work at all. Try every combination you can think of at: http://j.mp/9sIWEn

Good error messages should include:

  1. A summary at the top of the page of all the errors (long forms usually push the user back to the top of the page)
  2. A highlight around each field with an error
  3. An explanation with an example or clear direction where the visitor went wrong
  4. Not be nit-picky about formatting, transform as much as possible automatically

In the end I brought this issue up to Groupon and they fixed it within an hour. The issue was not with their code, but on the survey vendor’s site. It got me thinking about the time and effort the user has gone through to get to this point and end up confronted with a road block. These small things have the potential to be a huge turn off for the average user. Command line tools may be great but nothing replaces what you can learn by testing things by hand.

* Note, that is not my real phone number 😉

2 Comments

  1. Lionel
    Mar 10, 2015 @ 12:43:02

    Hello admin, i found this post on 18 spot in google’s
    search results. You should reduce your bounce rate in order
    to rank in google. This is major ranking factor nowadays.
    There is very handy wp plugin which can help you. Just search in google for:

    Lilas’s Bounce Plugin

  2. 【jg】REBECCA MINKOFF レベッカミンコフ レザー スタッズ クラッチ 《 CoCo Clutch with Studs 》 高級感
    Aug 27, 2015 @ 17:28:09

    http://rubrow.com/rebeccaminkoff/36.html【jg】REBECCA MINKOFF レベッカミンコフ バッグ チェーンストラップ キルティング レザー ショルダー バッグ 《 Mini Affair diamond Quilt 》 高級感のある ラグジュアリー 本革 ポシェット?オリジナル保存袋付き!雑誌掲載:ジャングル ジャングル

Leave a Reply

*