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
Valit is available on [NuGet](https://www.nuget.org/packages/Valit/).
15
+
16
+
### Package manager
17
+
```bash
18
+
Install-Package Valit -Version 0.1.0
19
+
```
20
+
21
+
### .NET CLI
22
+
```bash
23
+
dotnet add package Valit --version 0.1.0
24
+
```
10
25
11
26
# Getting started
12
27
In order to create a validator you need to go through few steps. It's worth mentioning that not all of them are mandatory. The steps are:
13
28
14
-
- creating new instance of validator using ``Create()`` static method
15
-
- choosing [validation strategy](http://valitdocs.readthedocs.io/en/latest/strategies/index.html) using ``WithStrategy()`` method **(not required)**
29
+
- creating new instance of validator using ``Create()`` static method.
30
+
- choosing [validation strategy](http://valitdocs.readthedocs.io/en/latest/strategies/index.html) using ``WithStrategy()`` method **(not required)**.
16
31
- selecting property using ``Ensure()`` method and defining rules for it.
17
32
- Extending rules with [custom errors](http://valitdocs.readthedocs.io/en/latest/validation-errors/index.html) (such as messages or error codes), [tags and conditions](http://valitdocs.readthedocs.io/en/latest/validation-rules/index.html). **(not required)**.
18
-
- applying created rules to an object using ``For()`` method
33
+
- applying created rules to an object using ``For()`` method.
19
34
20
35
Having the validator created, simply invoke ``Validate()`` method which will produce the result with all the data.
21
36
@@ -37,7 +52,8 @@ These are the validation criteria:
37
52
-``Password`` is required and needs to be at least 10 characters long
38
53
-``Age`` must be greater than 16
39
54
40
-
This is how Valit handles such scenario:
55
+
56
+
This is how you can handle such scenario using Valit:
<Description>Valit is dead simple validation for .NET Core. No more if-statements all around your code. Write nice and clean fluent validators instead!</Description>
9
+
<Authors>Dariusz Pawlukiewicz, Daniel Barwikowski, Arkadiusz Bal</Authors>
0 commit comments