You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for the great gem! There's just one thing that's not working.
For some reason, no error messages are appearing. I've tried the solution from this issue (#286) and even uncommenting the block from the initializer (even though I don't think it should be necessary with simple_form), but nothing so far has worked.
Version of ClientSideValidations (from Gemfile)
gem 'simple_form', '2.0.4'
gem 'client_side_validations', '3.2.1'
gem 'client_side_validations-simple_form', '2.0.1'
Version of Rails (fom Gemfile)
gem 'rails', '3.2.8'
Code snippet from your model of the validations
validates_format_of :url, :with =>
/^(http|https)://[a-z0-9]+([-.]{1}[a-z0-9]+).[a-z]{2,5}(([0-9]{1,5})?/.)?$/ix, :message => "Invalid URL"
validates_presence_of :title, :url, :message => "Can't be blank"
The form code from your template
<%= simple_form_for @resource, remote: true, :validate => true do |f| %>
<%= f.hidden_field :skill_id, :value => @resource.skill_id %>
<%= f.input :title %>
<%= f.input :url %>
<%= f.association :objectives, :collection => Skill.find("#{@resource.skill_id}").objectives, :as => :check_boxes, :label_method => lambda { |objective| "#{objective.content}" } %>
First, thanks for the great gem! There's just one thing that's not working.
For some reason, no error messages are appearing. I've tried the solution from this issue (#286) and even uncommenting the block from the initializer (even though I don't think it should be necessary with simple_form), but nothing so far has worked.
Version of ClientSideValidations (from Gemfile)
gem 'simple_form', '2.0.4'
gem 'client_side_validations', '3.2.1'
gem 'client_side_validations-simple_form', '2.0.1'
Version of Rails (fom Gemfile)
gem 'rails', '3.2.8'
Code snippet from your model of the validations
validates_format_of :url, :with =>
/^(http|https)://[a-z0-9]+([-.]{1}[a-z0-9]+).[a-z]{2,5}(([0-9]{1,5})?/.)?$/ix, :message => "Invalid URL"
validates_presence_of :title, :url, :message => "Can't be blank"
The form code from your template
<%= simple_form_for @resource, remote: true, :validate => true do |f| %>
<%= f.hidden_field :skill_id, :value => @resource.skill_id %>
<%= f.input :title %>
<%= f.input :url %>
<%= f.association :objectives, :collection => Skill.find("#{@resource.skill_id}").objectives, :as => :check_boxes, :label_method => lambda { |objective| "#{objective.content}" } %>
The resulting HTML along with the script tag
The text was updated successfully, but these errors were encountered: