Column A is constrained to "Yes" or "No" via IsIncludedIn()
Column B is made mandatory via NotNull()
That works well, but is it possible to say that Column B is mandatory only if Column A is equal to "No"? Chaining (multiple constraints on a single column) is not what I want to do, what I want is a constraint that takes multiple columns as its input. Is that possible?
Thanks for your work! Great library, very clean and well-documented :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Cross-validation (involving multiple columns) isn't supported, but it should be possible to achieve it by writing some custom cell processors. See this for an example. If you see a better solution let me know!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
Consider a SuperCSV import with these processors:
IsIncludedIn()
NotNull()
That works well, but is it possible to say that Column B is mandatory only if Column A is equal to "No"? Chaining (multiple constraints on a single column) is not what I want to do, what I want is a constraint that takes multiple columns as its input. Is that possible?
Thanks for your work! Great library, very clean and well-documented :)
Hi Ronan,
Cross-validation (involving multiple columns) isn't supported, but it should be possible to achieve it by writing some custom cell processors. See this for an example. If you see a better solution let me know!
Having a look at these examples. Thanks for the fast answer!