lucas franceschi wrote:
> I am having a hard time looking for a plugin/gem to auto-validate a form 
> in
> client-side, just like "live-validations"...
> <snip>
> i don't wanna know from you guys HOW to do it, i just wanna know if 
> anyone
> here uses this kind of validation, and which plugin/gem you use...

Personally, I don't generally use client-side validation. The problem 
that I see with doing validation client-side is that there is no 
guarantee that client-side scripting is enabled. Which means that any 
client-side validation must be duplicated server-side anyway.

Any differences in server and client validation algorithms could be 
confusing to the user, or worse end up allowing invalid data to reach 
the database. If you were relying on a particular client-side validation 
that did not exist server-side (either accidentally or by design) that 
could easily allow invalid input into the database.

I prefer to have all my validation logic side the model (server-side). I 
am of the opinion that it is the responsibility of the Model layer of 
MVC to validate data and not the View layer. Although the view objects 
can often assist the user with entering proper values, such as with 
drop-downs, checkboxes, radio buttons, etc. But, I would not rely on the 
view for full and proper input validation.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to