Skip to content

Commit

Permalink
Merge pull request #56 from shystruk/dev
Browse files Browse the repository at this point in the history
Correct a row number for not unique columns
  • Loading branch information
shystruk authored May 13, 2021
2 parents f846554 + 635d9c1 commit 680646d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csv-file-validator",
"version": "1.10.2",
"version": "1.10.3",
"description": "Validation of CSV file against user defined schema (returns back object with data and invalid messages)",
"main": "./src/csv-file-validator.js",
"repository": "https://github.com/shystruk/csv-file-validator.git",
Expand Down
4 changes: 2 additions & 2 deletions src/csv-file-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@
if (duplicates.indexOf(value) >= 0) {
file.inValidMessages.push(
_isFunction(header.uniqueError)
? header.uniqueError(header.name, rowIndex + 1)
? header.uniqueError(header.name, rowIndex + 2)
: String(
header.name + " is not unique at the " + (rowIndex + 1) + "row"
header.name + " is not unique at the " + (rowIndex + 2) + "row"
)
);
} else {
Expand Down

0 comments on commit 680646d

Please sign in to comment.