Skip to content

Commit ee6b7ce

Browse files
authored
Merge pull request #37 from yassun7010/update_readme
docs: update README.
2 parents 8202899 + af19791 commit ee6b7ce

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

serde_valid/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ Serde Valid support standard validation based JSON Schema.
6464

6565
## Complete Constructor (Deserialization)
6666

67-
Serde Valid support complete constructor method using by [`serde_valid::json::FromJsonValue`](json::FromJsonValue) trait.
67+
Serde Valid support complete constructor method using by
68+
[`serde_valid::json::FromJsonValue`](json::FromJsonValue) trait.
6869

6970
```rust
7071
use serde::Deserialize;
@@ -94,7 +95,8 @@ assert_eq!(
9495
);
9596
```
9697

97-
You can force validation by only deserialization through `serde_valid`, and removing `serde_json` from `Cargo.toml` of your project.
98+
You can force validation by only deserialization through `serde_valid`, and removing
99+
`serde_json` from `Cargo.toml` of your project.
98100

99101
## Serialization
100102

@@ -355,9 +357,7 @@ assert!(s.validate().is_ok());
355357
```
356358

357359
## Validation Errors Format
358-
359360
### Named Struct
360-
361361
Field errors are output to `properties`.
362362

363363
```rust
@@ -387,8 +387,8 @@ assert_eq!(
387387
```
388388

389389
### Unnamed Struct
390-
391-
Field errors are output to `items`. The key for `items` is guaranteed to be a string of positive numbers.
390+
Field errors are output to `items`. The key for `items` is guaranteed to be a string of positive
391+
numbers.
392392

393393
```rust
394394
use serde_json::json;
@@ -420,7 +420,6 @@ assert_eq!(
420420
```
421421

422422
### New Type
423-
424423
Field errors are output to `errors`.
425424

426425
```rust
@@ -444,7 +443,6 @@ assert_eq!(
444443
```
445444

446445
### Named Enum
447-
448446
Variant errors are output to `properties`.
449447

450448
```rust
@@ -481,8 +479,8 @@ assert_eq!(
481479
```
482480

483481
### Unnamed Enum
484-
485-
Variant errors are output to `items`. The key for `items` is guaranteed to be a string of positive numbers.
482+
Variant errors are output to `items`. The key for `items` is guaranteed to be a string of
483+
positive numbers.
486484

487485
```rust
488486
use serde_json::json;
@@ -516,7 +514,6 @@ assert_eq!(
516514
```
517515

518516
### Newtype Enum
519-
520517
Variant errors are output to `errors`.
521518

522519
```rust

serde_valid/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
//!
230230
//! ### Rules
231231
//!
232-
//! **Warning**: this feature is deprecated. Please use `#[validate(custom)]` instead.
232+
//! 🚸 **Warning** 🚸 : this feature is deprecated. Please use `#[validate(custom)]` instead.
233233
//!
234234
//! If you want to check multi fields validation, can use `#[rule]`.
235235
//!

0 commit comments

Comments
 (0)