`validates :price :name, presence: true` is preferable.