-
Notifications
You must be signed in to change notification settings - Fork 403
Formtastic
mhenrixon edited this page Apr 20, 2011
·
14 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 }
If you want to turn off the validation for an association you just create a fields for and set the validate to false:
= semantic_form_for @user, :validate => true do |user|
= user.input :email
= user.semantic_fields_for :address, :validate => false do |address|
=address.input :street # won't be validated regardless
=address.input :city # won't be validated regardless