What problem does it solve?
It helps you express business validation as small, typed predicates and combine them into reliable rule sets, avoiding tangled conditionals and inconsistent error handling.
Core Features & Use Cases
- Composable Rule Engine: Build validation logic from sync and async rules and combine them with and/or/linear/if patterns.
- Typed and Untyped Rule Variants: Use
Rule<TContext>/AsyncRule<TContext> for void outcomes, and TypedRule/TypedAsyncRule when you need a success value (Result<TResult>).
- Deterministic Evaluation Modes: Choose between collecting all failures (
and*) or stopping at the first failure (linear*), and support conditional branching via if*.
- Context-Aware Errors: Create rules from predicates with fixed or factory-based error providers.
Quick Start
Use the tsentials-rules skill to evaluate an and-composed registration rule for a user context and return all validation errors at once.