in reply to RFC: Algorithm::CouponCode

Your demo is not working if javascript is turned off. I assume this is only a characteristic of your demo site. But you might check if your library works even when there is no javascript that for example adds those '-' characters

UPDATE: Removed wrong statement

Replies are listed 'Best First'.
Re^2: RFC: Algorithm::CouponCode
by grantm (Parson) on Apr 07, 2011 at 11:01 UTC

    Thanks for taking a look.

    Sorry, I should have mentioned that JavaScript is required for the demo. I've updated the link.

    In a live app, the JavaScript is optional and the backend validation routine doesn't care if you enter the '-' characters or not.

    I don't really get what you mean about the highlighting decreasing the security. If the box is red the user made a typo - the aim is to help the user. Having the box go green doesn't mean you typed the right thing it just means you typed one of the 32768 possible codes that would make that box go green.

    I haven't yet decided whether the green is useful. The red to indicate a keying error is kind of the whole point but the green is optional.

      Sorry, after I had read the more detailed description further down the webpage I realized my error. You saw my old post.