Skip to content

Commit

Permalink
Fix typo in aspnet.md docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arphox authored and JeremySkinner committed Feb 20, 2023
1 parent 5cd8436 commit bab4306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/aspnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public class PeopleController : Controller
}
```

Because our validator is registered with the Serivce Provider, it will be injected into our controller via the constructor. We can then make use of the validator inside the `Create` action by invoking it with `ValidateAsync`.
Because our validator is registered with the Service Provider, it will be injected into our controller via the constructor. We can then make use of the validator inside the `Create` action by invoking it with `ValidateAsync`.

If validation fails, we need to pass the error messages back down to the view so they can be displayed to the end user. We can do this by defining an extension method for FluentValidation's `ValidationResult` type that copies the error messages into ASP.NET's `ModelState` dictionary:

Expand Down

0 comments on commit bab4306

Please sign in to comment.