I saw that one one.  The mask I am describing is on the phone number field.  It fixes formatting on the fly using keypress. (rather than Blur)
So it never shows an error, it just fixes the formatting automagically.  Try typing in (510) 555-12dog12. It ends up 510-555-1212.

We are going to use something similar for creditcard fields, zip codes, year, or any field like that.

The code for it is in the example inlineError.js file at the bottom, but it can be so much shorter using jQuery, I think.

Glen



On 9/27/06, John Resig <[EMAIL PROTECTED]> wrote:
> For Intuit (QuickBooks, Quicken, TurboTax).  We did an ad hoc evaluation of
> the different frameworks and jQuery rocked.
> A few of us here are passing around the jQuery kool-aid.  Take a sip!

That's great to hear :-)

> Here is a question:  On the form validation example, take a look at the
> phone number mask.
> I think this would make a great jQuery plugin.  It has the right pieces of
> the puzzle.  Example:
> <input type="text" jMask="###-###-####">
>
> Works as a great constraint to keep data in the correct format.
> I have no idea how to port this into a plugin.  I am really not that good of
> a programmer. I am an interaction designer.
> Any suggestions?

You should check out this form validation plugin:
http://fuzz.bassistance.de/jQueryFormValidation/validateTest.html

I think it'll handle what you're looking for (this was from
http://jquery.com/plugins/).

Hope this helps.

--John

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to