Fixed conditional validation in ode.rb model