nValid
Fluent validation library for .NET
With nValid, you can cleanly define validation rules for any .NET object, and validate instances of objects with a very simple syntax.
Features
The main features are:
- Fluent interface for configuration
- Can validate any POCO
- Zero dependencies
- Easily extensible
- Can use resources to set error message (localization support).
Planned features
The following features are not yet available, but are planned:
- Validation contexts. Currently, only one ruleset can be defined per class. We need to be able to define named rulesets in order to apply different rules to the same object, in various scenarios.
- Client-side validation. We want to be able to generate client-side validation logic based on our rulesets. Either integrate with an existing library (for example, xVal), or develop our own solution.
- Cleaner way to setup rules. The current syntax for registering rules makes it hard to organize a large number of rulesets. We need a clean way to have rulesets in individual files. Probably something similar to StructureMap's registries.
Project status
This is still a very early version and is not production ready. I would love to receive comments, code reviews, suggestions and/or patches. You can reach me at comments@nvalid.net.
Thanks
nValid uses code by :