I am using client side validation gem. Client side validation is not working while applying conditions. Here is my Model Class.
validates_uniqueness_of :project_code
**validates :price, numericality: true, :if => :project_type_fixed?**
def project_type_fixed?
project_type == 'Fixed'
end
In this code validation for project_code is working fine, but for price it is not working.
Thanks in advance.