@@ -23,18 +23,18 @@ Parses URLSearchParams to JavaScript objects according to Zod schemas.
23
23
- Any property may be ` z.nullable() ` except ` z.array() ` .
24
24
- Properties that are ` z.literal() ` are allowed and must still obey all of these rules.
25
25
- A ` z.array() ` must be of a single value-type.
26
- - The value-types must obey all the same basic rules
27
- for primitive object, union, and property types.
28
- - Value-types may not be ` z.nullable() ` or ` z.undefined() ` .
29
- - The value-type cannot be an ` z.array() ` or contain a nested ` z.array() ` at any level.
26
+ - The value-types must obey all the same basic rules
27
+ for primitive object, union, and property types.
28
+ - Value-types may not be ` z.nullable() ` or ` z.undefined() ` .
29
+ - The value-type cannot be an ` z.array() ` or contain a nested ` z.array() ` at any level.
30
30
- A ` z.record() ` has less-strict schema constraints but weaker parsing guarantees:
31
- - They keys must be ` z.string() ` .
32
- - The value-type may be a single primitive type.
33
- - The value-type may be a union of primitives.
34
- This union must include ` z.string() `
35
- and all values will be parsed as ` z.string() ` .
36
- - The value-type may be ` z.nullable() ` .
37
- - The value-type may not be a ` z.record() ` , ` z.array() ` , or ` z.object() ` .
31
+ - They keys must be ` z.string() ` .
32
+ - The value-type may be a single primitive type.
33
+ - The value-type may be a union of primitives.
34
+ This union must include ` z.string() `
35
+ and all values will be parsed as ` z.string() ` .
36
+ - The value-type may be ` z.nullable() ` .
37
+ - The value-type may not be a ` z.record() ` , ` z.array() ` , or ` z.object() ` .
38
38
39
39
## Installation
40
40
0 commit comments