User Activity

  • Modified a comment on ticket #124 on opencsv

    thank you both. The reason I have this use case is so that the user can see all the errors during an import, avoiding the need to fix the errors one by one. I could workaround by reading the CSV rows into a Bean where all properties are string and run my validation logic after. For the case of data miss one semicolon, I see OpenCSV is already throwing "CsvRequiredFieldEmptyException: Number of data fields does not match number." I agree just this error is sufficient to indicate the file is corrupted...

  • Posted a comment on ticket #124 on opencsv

    thank you both. The reason I have this use case is so that the user can see all the errors during an import, avoiding the need to fix the errors one by one. I could workaround by reading the CSV rows into a Bean where all the are type string and run my validation logic after. For the case of data miss one semicolon, I see OpenCSV is already throwing "CsvRequiredFieldEmptyException: Number of data fields does not match number." I agree just this error is sufficient to indicate the file is corrupted...

  • Posted a comment on ticket #124 on opencsv

    Thank you Scott! I tested moving the verifiers into their own class. The behavior I found is only the exception from the first verifier is returned from getCapturedExceptions(), the latter verifiers are not executed after the first verifier thrown an exception for that row. For example in this change, CountryVerifier was set first so getCapturedExceptions() return the exception from that verifier. https://github.com/yatw/openCsvValidationDemo/commit/657a9121e97b0a48ecad938e978e8ab58d34ef99#diff-b238fe60176ed02237cddabacb5b4ab05b6f7c26ede636fe8550faa77797979e...

  • Created ticket #124 on opencsv

    Support: Can beanVerifer validate all errors in a row

View All

Personal Data

Username:
yatw
Joined:
2024-04-12 23:15:07.790000

Projects

  • No projects to display.

Personal Tools