DynamicWhere.ex
DynamicWhere.exv2.1.0·docs

Condition Validation

A Condition is validated before its predicate is generated. Any broken rule throws a LogicException with the listed error code.

Rules

RuleError Code
Field must be non-empty and exist on TInvalidField
Between / NotBetween require exactly 2 valuesRequiredTwoValue
In / IIn / NotIn / INotIn require 1+ valuesRequiredValues
IsNull / IsNotNull require 0 valuesNotRequiredValues
All other operators require exactly 1 valueRequiredOneValue({Operator})
Values must not be null/whitespaceInvalidValue
Guid values must parse as GuidInvalidFormat
Number values must parse as a numeric typeInvalidFormat
Boolean values must parse as boolInvalidFormat
Date / DateTime values must parse as DateTimeInvalidFormat
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.