TypeConverter and validate order #1639
Unanswered
d-lepestipon
asked this question in
Q&A
Replies: 1 comment
-
Validate happens on the raw field and I think that's how that should be. Most cases will be non strings after a conversion, so validation doesn't make sense to me in that case. Can you pull out the code from The new parser I'm working on will have a configuration methods to modify the field during parsing, so you could probably take advantage of that when it's released. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I m facing with a common use case, but ca'nt handle it correctly.
I must remove some special chars from a field and AFTER validate it.
I use a TypeConverter and the Validate method. But Validate triggers before type convertion.
Is there a way to change this?
It should be possible to do it, I think my use case is very common.
I know I could use ConvertUsing, but this method is too generic, using it for evry field break the readability. As it take the full row, "strange code" come :
My header can change, but I can't reflect it in
GetField
(only one string allowed), so I must lock the index. So now index of these column (even with header) is fixed.I think
ConvertUsing
should be used less possible, and use separated fluent methods instead.Beta Was this translation helpful? Give feedback.
All reactions