Condition Validation
A Condition is validated before its predicate is generated. Any broken rule throws a LogicException with the listed error code.
Rules
| Rule | Error Code |
|---|---|
Field must be non-empty and exist on T | InvalidField |
Between / NotBetween require exactly 2 values | RequiredTwoValue |
In / IIn / NotIn / INotIn require 1+ values | RequiredValues |
IsNull / IsNotNull require 0 values | NotRequiredValues |
| All other operators require exactly 1 value | RequiredOneValue({Operator}) |
| Values must not be null/whitespace | InvalidValue |
Guid values must parse as Guid | InvalidFormat |
Number values must parse as a numeric type | InvalidFormat |
Boolean values must parse as bool | InvalidFormat |
Date / DateTime values must parse as DateTime | InvalidFormat |
Related
Note
Operator/value arity is enforced before any value is parsed. A missing value for
Between raises RequiredTwoValue regardless of whether the (missing) value would have parsed.