Skip to content

Commit 680646d

Browse files
authored
Merge pull request #56 from shystruk/dev
Correct a row number for not unique columns
2 parents f846554 + 635d9c1 commit 680646d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "csv-file-validator",
3-
"version": "1.10.2",
3+
"version": "1.10.3",
44
"description": "Validation of CSV file against user defined schema (returns back object with data and invalid messages)",
55
"main": "./src/csv-file-validator.js",
66
"repository": "https://github.com/shystruk/csv-file-validator.git",

src/csv-file-validator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@
144144
if (duplicates.indexOf(value) >= 0) {
145145
file.inValidMessages.push(
146146
_isFunction(header.uniqueError)
147-
? header.uniqueError(header.name, rowIndex + 1)
147+
? header.uniqueError(header.name, rowIndex + 2)
148148
: String(
149-
header.name + " is not unique at the " + (rowIndex + 1) + "row"
149+
header.name + " is not unique at the " + (rowIndex + 2) + "row"
150150
)
151151
);
152152
} else {

0 commit comments

Comments
 (0)