Filter validation problems #209
-
Hello!
For the enum and DateTime, I send queries with incorrect filters I found a function Here are the error traces, maybe they will be useful:
As I understand it, I will have to do parsing of the filter syntax tree at the validation stage and check all my fields manually? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @KaJIbI4, |
Beta Was this translation helpful? Give feedback.
Hi @KaJIbI4,
Yes, the current implementation of the GridifyQuery
isValid
method checks the field names. As for exceptions, we depend on dotnet parsers. If the value you provide can be parsed by the built-in dotnet parser and converters, Gridify tries to avoid any exceptions since the value does not exist. However, if parsing fails, an exception is thrown (for example, when converting a string to an integer, which should not happen).You can improve the functionality by accessing the SyntaxTree or using the mapper's value converter to parse the value before it gets to the GridifyQueryBuilder...
However, if you believe there is a scenario that Gridify should inherently support regarding the…