I have given server side validation of nested form. each of that having model and in that given server side validation. But, main of that form of in model server side validation working of at the time of save, which i have disabled it. but, also i have disabled nested forms model server side validation, but it is not working.
validates_presence_of :user_mob, :message => 'please enter the mobile number.' ,unless: :skip_valid validates_presence_of :address, :message => 'please enter the address.', unless: :skip_valid
//this is main model
class UserDetails< ActiveRecord::Base belongs_to :u_user_details, :foreign_key => 'u_id'
validates_presence_of :year, :message => 'please enter the details.', unless: :skip_valid validates_presence_of :user_name, :message => 'please enter the details.', unless: :skip_valid validates_presence_of :user_address, :message => 'please enter the details.', unless: :skip_valid validates_presence_of :user_mobile, :message => 'please enter the details.', unless: :skip_valid validates_presence_of :user_type, :message => 'please enter the details.', unless: :skip_valid
end
Even I am giving unless: skip_valid in netsted forms model. it is not working. how to disable nested forms model server side validation.
save(false)
the false indicates that you do not want to run validations