Validate complete CSV file in NodeJS (header line, data types etc)

Viewed 1449

How can I validate complete CSV file in NodeJS:

  • check if every line has corresponding delimiter and newline character (LF) (if header line has ";" delimiter, the rest lines should too)
  • check if every line has correct/expected number of columns
  • check if header line has correct/expected column names
  • check if rest of lines have values of correct data type ?

Columns number and columns names would be predefined.

0 Answers
Related