I use CsvHelper.Configuration.ClassMap to read csv file and faced with data validation.
I found Validate option and wrote a simple code:
Map(m => m.Field).Name("myField").Validate(row => row.Contains('='));
But I don't understand an output and confused a bit with possible options.
So, my questions are:
If it returns true - will I receive string? Or boolean true? I want to add the value to DB after that..
If it returns false - what I receive? And, anyway, the value will not be added to DB?
Any ideas how to add simple validation? Usual code, without validation:
Map(m => m.Field).Name("myField");
Thank you in advance!