chop-dbhi / data-models-validator

Set of tools for validating data that should conform to a data model.
1 stars 2 forks source link

EscapedQuotesValidator false positives #13

Closed gracebrownecodes closed 8 years ago

gracebrownecodes commented 8 years ago

The CSV package converts escaped quotes (doubled) to single quotes automatically on read, so the EscapedQuotesValidator will always return an error for any quote in a value.

I see two options:

- Try to access the raw value from the underlying io.Reader in some way.
- Turn off LazyQuotes on the csv.Reader and catch and report on the resulting errors.

Here's the Go csv docs, for reference. The double quote auto-conversion is in the second example in the overview and the LazyQuotes option is in the Reader type definition.