Conditional validation not working #34

Lordnibbler opened this Issue Aug 6, 2013 · 0 comments


None yet

1 participant


I'm passing a validate: true to a model with a conditional validator. The model includes ActiveModel::Validations and ActiveModel::Conversion and extends ActiveModel::Naming. It does not persist to the database.

The following code, nested inside a simple_form_for @record, :validate => true, :url => "/some_url" do |f|

Then, this line does not generate a validator for the field, and no required asterisk shows up:

%td= f.input :problem, validate: true, prompt: "Select a Problem", collection: boombot_problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment