forked from DavyJonesLocker/client_side_validations
-
Notifications
You must be signed in to change notification settings - Fork 0
Formtastic
n0nick edited this page Jan 24, 2012
·
11 revisions
ClientSideValidations supports Formtastic.
Example:
<%= semantic_form_for @book, :validate => true do |book| -$>
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 }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.