Validot is a performance-first, compact library for advanced model validation. Using a simple declarative fluent interface, it efficiently handles classes, structs, nested members, collections, nullables, plus any relation or combination of them. It also supports translations, custom logic extensions with tests, and DI containers.
More human-friendly paths/names argument in the messages.
This is pretty much a copy cat of FluentValidation feature.
We already have {_name} message argument, maybe create a parameter like {_name|format=friendly} ?
SuperValue name would be Super Value..
Feature in action
Specification<decimal> specification = s => s
.Positive()
.WithPath("Number.Primary.SuperValue")
.WithMessage("The {_name|format=friendly} needs to be positive!");
var validator = Validator.Factory.Create(specification);
var result = validator.Validate(-1);
result.ToString();
// Number.Primary.SuperValue: The Super Value needs to be positive!
Feature details
Extra parameter in Name argument?
Extra method in PathHelper that does the smart path resolving?
Feature description
{_name}
message argument, maybe create a parameter like{_name|format=friendly}
?SuperValue
name would beSuper Value
..Feature in action
Feature details