Skip to content

Commit

Permalink
Correct error messages & prevent validation if chars in cell not > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
techncl committed Jan 30, 2025
1 parent 4b25e04 commit c8084f6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ object CsvValidatorUi extends SimpleSwingApplication {
var badLines = 0
var truncated = false

val maxCharsPerCell = convertTextboxValueToInt(potentialMaxCharsPerCell, "errors to display", toConsole)
val maxNumOfLines = convertTextboxValueToInt(potentialMaxNumOfLines, "characters per column", toConsole)
val maxCharsPerCell = convertTextboxValueToInt(potentialMaxCharsPerCell, "characters per column", toConsole)
val maxNumOfLines = convertTextboxValueToInt(potentialMaxNumOfLines, "errors to display", toConsole)

val safeToRunValidation = csvFilePath.nonEmpty && csvSchemaFilePath.nonEmpty && maxNumOfLines > 0
val safeToRunValidation = csvFilePath.nonEmpty && csvSchemaFilePath.nonEmpty && maxCharsPerCell > 0 && maxNumOfLines > 0

def logRowCallback(maxBadLines: Int)(row: ValidatedNel[FailMessage, Any]): Unit = row match {
case Invalid(failures) =>
Expand Down

0 comments on commit c8084f6

Please sign in to comment.