Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
6 Posts
Live validation

you can see this step by step example to implement live validation in RoR

And always remember that any client-side validation is cosmetical only. As the saying goes - never trust user input. Use live validation all you want, but make sure all data is also checked again by implementing the proper validation in your model, e.g. by using the nice plugin mentioned by Kevin above.

Did I already mention never trusting user data?

It's that important, really.

Sergio Gil released a plugin recently which allows automatic integration with the livevalidation library. The nice thing is that it uses the validations defined in your model to generate the javascript which keeps things nice and DRY. Not all validations are supported but the main types are all there.

You can find the docs here: http://livevalidation.rubyforge.org/

Sign In To Rate Post

thanx kof.. let me try it and know u the results...

ya checked that.. but which .js file to download.. can u just briefly explian... because i am very new to ror and interested in live validation....

i just tried many times to work with live validation.But i cant.can anyone explain how to work with live validation. i am working in radrails as my IDE.

6 Posts
Login to add your message