You are here: Forums Ask a Rails expert Live validation...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 14
Sign in to rate this post
|
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. |
Authority 37
Posting Rating 95
Sign in to rate this post
|
It’s dead simple … Just take a look at the examples and you should be fine … |
Authority 0
Posting Rating 14
Sign in to rate this post
|
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…. |
Authority 37
Posting Rating 95
Sign in to rate this post
|
There should be a file named livevalidation_standalone.compressed.js in your download files – copy it to your public/javascripts file and include it. That should do the trick. Just a little recommendation: If you’re new to Rails, I’d suggest building your first apps without too much AJAX because it can sometimes be quite tricky. Try to get comfy with Rails first and add the AJAX stuff later. HTH |
Authority 0
Posting Rating 14
Sign in to rate this post
|
thanx kof.. let me try it and know u the results… |
Authority 0
Posting Rating 0
Sign in to rate this post
|
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. You can find the docs here: http://livevalidation.rubyforge.org/ |
|
Authority 12
Posting Rating 0
Sign in to rate this post
|
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. |
Ask a Rails expert : Tracking down an issue
Ask a Rails expert : Thread Vs Transaction
Ask a Rails expert : implementing whitelist plugin
Ask a Rails expert : Validation helper
Ask a Rails expert : FILE EDIT/DELETE
Ask a Rails expert : decrypting the password
Ask a Rails expert : Static Objects in Rails
Ask a Rails expert : Newbie - Rake Cant Execute Test
Ask a Rails expert : Call Web service
Ask a Rails expert : RMagick issues