title: Javascript : Reject csv with more than one column
body: <p>I have to do validation on csv where file should be rejected if it has more than 1 columns. Is there any regular expression i can use or any other way to check for all delimiters. As of now I am trying to :</p>
  
  <pre><code>const reader = new FileReader();
  let data = [];
  reader.onload = (e) =&gt; { 
        const data = e.target.result;
  }
  let validInd = true;
  for (const email of data) {
       if (email.search(',') !== -1) {
            validInd = false;
            break;
        }
   }
  </code></pre>
  
  <p>Please don't go with exact code , assume file is read and list created out of each line is stored in 'data'. 'data' for csv with 2 columns will have something like:</p>
  
  <pre><code>data = ['dilask1@gmail.com, dilask1@gmail.com', 'dilask2@gmail.com, dilask1@gmail.com']
  </code></pre>
  
  <p>with one column:</p>
  
  <pre><code>data = ['dilask1@gmail.com', 'dilask2@gmail.com']
  </code></pre>
  
  <p>Above code will only validate if csv is comma separated , do we have generic check to something which will allow me reject csv file having more than one column with any delimeter, if not, what is the standard logic.</p>