Skip to content
n0nick edited this page Jan 24, 2012 · 14 revisions

ClientSideValidations supports Formtastic.

Example:

<%= semantic_form_for @book, :validate => true do |book| -$>

Turn off validation per input

If you want to turn off the validation for a particular input you have to use the :input_html syntax for Formtastic:

= semantic_form_for @user, :validate => true do |user|
  = user.input :email
  = user.input :username, :input_html => { :validate => false }

Formtastic-Bootstrap

To support the Formtastic-Bootstrap form builder for Formtastic, include the javascript found in the gist at this link when displaying the form. This would add the missing callbacks for showing and hiding form errors.