title: Reduce number of ifs in React form validation
body: <p>I am trying to validate if all the fields of a form are filled. So I created this validation function:</p>
  <pre><code>const validateFields = () =&gt; {
      if(values.phase_name === ''){
        return false
      }else if(values.phaseSelected === ''){
        return false
      }else if(values.first_mobilization === ''){
        return false
      }else if(values.start_before_maintenance_stop === ''){
        return false
      }else if(values.end_before_maintenance_stop === ''){
        return false
      }else if(values.start_maintenance_stop === ''){
        return false
      }else if(values. end_maintenance_stop === ''){
        return false
      }else if(values.start_startup){
        return false
      }else if(values.end_startup){
        return false
      }else if(values.demobilization === ''){
        return false
      }else{
        return true
      }
    }
  </code></pre>
  <p>When I click the submission button, the <code>validateFields</code> function is called. Is there a better way to validate this fields, with less if´s?</p>