Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
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.
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....
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/
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.
you can see this step by step example to implement live validation in RoR
