views:

1499

answers:

5

Hello Everyone,

After having a search around I could not find exactly what I want, I am looking to validate a form client side using the Jquery library and some form of validation plugin. I was hoping that some one could advise me on whether there are any validation plugins out there that do not use generic error messages, as my form is laid out with no room for these errors, and I also I want the validator to to for correct content as well.

Basically I want to be able to check the field on each key press and blur and if the fields validates for it to gain a green border, and if it does not validate for it to gain a red border, any one know of a plugin that can do this?

Thanks

sico87

+3  A: 

I use this Form Validation plugin: http://docs.jquery.com/Plugins/Validation. While I'm not sure about the "live" validation, you could hide the "generic" errors using CSS:

label.error{ display: none; }

I know the plugin supports AJAX, so perhaps could be extended to do the live validation you want?

Chris
+5  A: 

I don't know what you searched for, but the Validation plugin (first google result for "jquery validation") does exactly what you want... Read the docs that come with it.

Oli
I fought so long not to use this one for some reason, but man this thing is perfect. For anyone needing validation, make sure you start here.
FluidFoundation
+2  A: 

Heres a jQuery plugin that I created and has live form validation also.

http://www.geektantra.com/2009/09/jquery-live-form-validation/

GeekTantra
A: 

My plugin uses client-side when possible, fallbacks on seamless AJAX when client-side is not really a good idea (validates_uniqueness, etc). Peep the README, you just do like you always did in you model - validatious-on-rails handles the rest using the excellent library "Validatious".

You find the plugin/gem here:

http://github.com/grimen/validatious-on-rails

Feel free to message me if you got any issues - should be stable though. =)

grimen
A: 

i like this one. as you can customize the function to validate.

melaos