I've been working on a tool for use in situations where a special code needs to be passed to a person in printed form (e.g.: account activation code in a letter to a customer; giveaway cards for WIFI access; etc) and then needs to be typed into a web form by the recipient.

The paper-to-web-form path provides a number of ways for errors to creep in and opportunities for us to autocorrect some errors, highlight others and avoid some errors altogether.

The fruits of my labours can be viewed on this demo page (requires JavaScript). [based on Algorithm::CouponCode -- ed.]

There's a Perl module for generating easy-to-type codes and validating/correcting/cleaning up the codes submitted. There's also a JavaScript plugin to do client-side validation, correction and instant feedback on mistyped codes.

Feedback is welcome on the concept, the implementation and anything else that you want to comment on.


In reply to RFC: Algorithm::CouponCode by grantm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.