Question : rails validate presence if another field is not present
Answered by : muhammad-zubair-hsmd9dcm7hd8
validates :first_name, presence: true, unless: :last_name?
Source : https://stackoverflow.com/questions/6273289/validate-presence-of-field-only-if-another-field-is-blank-rails | Last Update : Wed, 10 Aug 22