ClientSideValidations.formBuilders[settings.type] is undefined #282

link-er opened this Issue Feb 21, 2012 · 2 comments


None yet
2 participants

link-er commented Feb 21, 2012

I'm trying to use client_side_validations gem, but have some problems.
First, I have in my Gemfile

     gem 'client_side_validations', :git => ''

and I after bundle install I see

  Using client_side_validations (3.2.0.beta.2) from (at master)

but I don't see this gem in gem list....This is first problem.
Second, and more important, validations do not work. I have an error in firebug console

    ClientSideValidations.formBuilders[settings.type] is undefined

and no validations happen. I'm using rails 3.2.1, formtastic 2.0.2 and here is my client_side_validations.rb file

      # ClientSideValidations Initializer

          # Uncomment the following block if you want each input field to have the validation messages attached.
             # ActionView::Base.field_error_proc = do |html_tag, instance|
        #   unless html_tag =~ /^<label/
                #     %{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
             #   else
            #     %{<div class="field_with_errors">#{html_tag}</div>}.html_safe
           #   end
            # end

Any help will be appriciated.....

dombesz commented Mar 3, 2012


link-er commented Mar 4, 2012

Found desicion. Try to install gem client_side_validations-formtastic and everything will work ( do not forget to run rails g client_side_validations:install and rails g client_side_validations:copy_assets ).

link-er closed this Mar 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment