Live Validation plugin

Plugin details

LiveValidation is a plugin which allows automatic integration of your Rails application with Javascript library LiveValidation.

This plugin generates the needed Javascript code to run client-side the validations you have already defined in your models (with Rails validation helpers) to run them server-side, and redefines form helpers to automaticaly include that Javascript code. You have not to write your validations twice so you can keep DRY. And if you have 1) used Rails validation helpers to validate your models, and 2) used Rails form helpers to create your forms, you only have to install this plugin to get your forms validated both server and client-side!

Websitehttp://www.livevalidation.com/ Repositorysvn://rubyforge.org/var/svn/livevalidation Author Sergio Gil Tags validation LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/livevalidation

Install Javascript and CSS files under public/, with this Rake task:

rake livevalidation:install



Remember including them in your headers, including Prototype too (as LiveValidation depends on it), this way (for example):

<%= javascript_include_tag 'prototype', 'live_validation' %>
<%= stylesheet_link_tag 'live_validation' %>



There is no step 3 ;) You only need to add validations to your models, and crete your forms using the Rails form helpers, something like this:

<% form_for(:resource, :url => resources_path) do |f| %>
<%= f.text_field :name %>
[etc ...]
<% end %>

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (2 older versions) | Last edited by: scott, 9 months ago