From 11991a06c8588206087c1d1e5026d50104e6bcc9 Mon Sep 17 00:00:00 2001 From: gengteng Date: Fri, 4 Aug 2023 22:52:48 +0800 Subject: [PATCH] update README.md --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a8b929a..fb33812 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/gengteng/axum-valid/.github/workflows/main.yml?branch=main)](https://github.com/gengteng/axum-valid/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/gengteng/axum-valid/badge.svg?branch=main)](https://coveralls.io/github/gengteng/axum-valid?branch=main) -This crate provides a `Valid` type that can be used in combination with `Json`, `Path`, `Query`, and `Form` types to validate the entities that implement the `Validate` trait from the `validator` crate. +This crate provides a `Valid` type that can be used in combination with `Json`, `Path`, `Query`, and `Form` extractors to validate the entities that implement the `Validate` trait from the `validator` crate. -Additional extractors like `TypedHeader`, `MsgPack`, `Yaml` etc. are supported through optional features. +Additional extractors like `TypedHeader`, `MsgPack`, `Yaml` etc. are supported through optional features. The full list of supported extractors is in the Features section below. ## Usage @@ -57,17 +57,18 @@ When validation errors occur, the extractor will automatically return 400 with v | query | Enables support for `Query` | ✅ | ✅ | | form | Enables support for `Form` | ✅ | ✅ | | typed_header | Enables support for `TypedHeader` | ❌ | ✅ | -| msgpack | Enables support for `MsgPack` and `MsgPackRaw` from `axum-msgpack` | ❌ | ❌ | -| yaml | Enables support for `Yaml` from `axum-yaml` | ❌ | ❌ | +| msgpack | Enables support for `MsgPack` and `MsgPackRaw` from `axum-msgpack` | ❌ | ✅ | +| yaml | Enables support for `Yaml` from `axum-yaml` | ❌ | ✅ | | extra | Enables support for `Cached`, `WithRejection` from `axum-extra` | ❌ | ✅ | | extra_query | Enables support for `Query` from `axum-extra` | ❌ | ✅ | | extra_form | Enables support for `Form` from `axum-extra` | ❌ | ✅ | | extra_protobuf | Enables support for `Protobuf` from `axum-extra` | ❌ | ✅ | | all_extra_types | Enables support for all extractors above from `axum-extra` | ❌ | ✅ | -| all_types | Enables support for all extractors above | ❌ | 🚧 | +| all_types | Enables support for all extractors above | ❌ | ✅ | | 422 | Use `422 Unprocessable Entity` instead of `400 Bad Request` as the status code when validation fails | ❌ | ✅ | | into_json | Validation errors will be serialized into JSON format and returned as the HTTP body | ❌ | ✅ | -| full | Enables all features | ❌ | 🚧 | +| full | Enables all features | ❌ | ✅ | + ## License This project is licensed under the MIT License.