I want to skip the validations of few attributes during creation of a new user like address, pin, phone number etc.
However, it still need to do the other validations in the model when user tries to edit it. I tried using :on => :update but that doesn't help me. Any suggestions ?
My Code:
validates :address, :presence => true, :length => { :maximum => 50 }, :on => :update
validates :city, :presence => true, :length => { :maximum => 50 }, :on => :update
validates :state, :presence => true, :length => { :maximum => 50 }, :on => :update
validates :zip, :presence => true, :numericality => true, :on => :update, :length => { :is => 5 }