You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation, Indexing, and Test Coverage Improvements
- Documentation and usage clarity
-- Rewrote and expanded README.md in English for clarity, adding detailed sections, updated examples, and best practices for SmartValidations.
- Collection validation and property indexing
-- Fixed collection item indexing in RuleSet.cs so that property paths use zero-based indices (e.g., Products[0]) in validation errors.
-- Updated ValidateTests.cs assertions to expect the correct zero-based property names.
- Validation rule test coverage
-- Added unit tests in RuleSetTests.Mist.cs for Email and Url rules, covering valid, invalid, null, and property prefix scenarios.
Biblioteca de validação fluente para .NET, construída sobre SmartProblems, focada em validar propriedades de modelos (especialmente DTOs/requests) e produzir `Problems` quando regras falham.
3
+
Fluent, model-first validation for .NET that produces structured Problems instead of exceptions. Built on top of SmartProblems to deliver actionable, localized, and machine-readable validation results.
4
4
5
-
Objetivo
6
-
- Validar propriedades de um modelo em uma única passagem usando um `RuleSet`.
7
-
- Retornar `Problems` via integração com SmartProblems (Problem, Problems, Result), sem lançar exceções.
8
-
- Facilitar validações aninhadas (objetos e coleções) e compor regras de forma fluente.
5
+
Why SmartValidations
6
+
- Single-pass model validation: express all rules fluently in one `RuleSet`.
7
+
- No exceptions for control flow: return `Problems` you can serialize and show to users.
8
+
- Strongly-typed and fluent: compile-time safety with `INumber<T>`, `CallerArgumentExpression`, and generics.
9
+
- First-class nested validation: validate objects and collections, automatically chaining property paths (with indexes for lists).
10
+
- Ready for APIs and UI: consistent error shapes, localization-friendly message templates, and rich metadata.
9
11
10
-
Targets e requisitos
12
+
Targets and requirements
11
13
- .NET 8, .NET 9, .NET 10.
12
-
- C# 12+ com uso de `CallerArgumentExpression`e genéricos com `INumber<T>`.
13
-
-Depende de SmartProblems para agregar e enriquecer erros.
14
+
- C# 12+ using `CallerArgumentExpression`and generic math (`INumber<T>`).
15
+
-Depends on SmartProblems for `Problem` and `Problems`.
14
16
15
-
Instalação
16
-
-Adicione SmartValidations e SmartProblems ao seu projeto (NuGet quando disponível).
17
+
Installation
18
+
-Add SmartValidations and SmartProblems (NuGet when available).
0 commit comments