Crackers and correlations

Monty J. Harder lists at kc.rr.com
Sat Oct 30 11:43:01 CDT 2004


"Dave Hull" <dphull at insipid.com> wrote:

> I agree. I was shocked when I listened to a former colleague of mine whine
about
> users not inputing their phone number correctly on a web interface he had
> created. "I even put instructions right next to the fields explaining that
they
> shouldn't input dashes or spaces or parentheses..." he said.

  Instead of putting

    tr -cd '[0-9]'
or if you want to allow things like 'ext' (which probably ought to be in a
separate field)
    tr -cd '[:alnum:]'

(or equivalent for the language) into his input code.  There could be a
client-side rule that suppresses the non-numeric characters from even
showing up in the field.  Sheesh.

I almost always have a process of canonicalizing input (unless some other
form of validation is being done).  If only certain




More information about the Kclug mailing list