diff --git a/docs/usage/options.md b/docs/usage/options.md index d613fe16f4..8716a27ab2 100644 --- a/docs/usage/options.md +++ b/docs/usage/options.md @@ -61,7 +61,7 @@ services.AddJsonApi(options => { ## Custom Query Parameters -If you would like to use custom query params (parameters not reserved by the json:api specification), you can set AllowCustomQueryParameters = true. The default behavior is to return an HTTP 400 Bad Request for unknown query parameters. +If you would like to use custom query params (parameters not reserved by the json:api specification), you can set `AllowCustomQueryParameters = true`. The default behavior is to return an HTTP 400 Bad Request for unknown query parameters. ```c# services.AddJsonApi(options => { @@ -78,3 +78,13 @@ If you want to change the default serializer settings, you can: options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; options.SerializerSettings.ContractResolver = new DasherizedResolver(); ``` + +## Enable ModelState Validation + +If you would like to use ModelState validation into your controllers when creating / updating resources you set `ValidateModelState = true`. By default, no model validation is performed. + +```c# +services.AddJsonApi(options => { + options.ValidateModelState = true; +}); +```