title: Ecto conditional validation if couple of fields present
body: <p>I'm trying to implement some validation for the model only if couple of fields present for the model.</p>
  
  <p>Like that:</p>
  
  <pre><code>if Changeset.get_field(changeset, :field_a) or Changeset.get_field(changeset, :field_b) do
    changeset
    |&gt; a_lot_of_validations
  else
    changeset
  end
  </code></pre>
  
  <p>The problem is: when <code>field_a</code> or <code>field_b</code> present, they returns <code>string</code>, so argument error is raised here, becauase</p>
  
  <pre><code>"string" or "string"
  </code></pre>
  
  <p>returns argumenterror in elixir. Implement <code>not(is_nil(get_field))</code> make the line length so long (it's even long right now), so I'm curious about clean way of implementing this conditional validation.</p>