mirror of
https://codeberg.org/reflect/reflect-rules-plugin.git
synced 2025-09-13 16:33:42 +02:00
feat(doc): add CSV ref. to README
This commit is contained in:
parent
d748d5205a
commit
869b5f07b5
1 changed files with 16 additions and 3 deletions
19
README.md
19
README.md
|
@ -99,11 +99,11 @@ Type|Description
|
|||
--|--
|
||||
`Type::NUMERIC`|Value must be a number or a numeric string
|
||||
`Type::STRING`|Value must be a string
|
||||
`Type::BOOLEAN`|Value must be a boolean or ([**considered bool for GET rules**](#boolean-coercion-from-string-for-search-parameters))
|
||||
`Type::ARRAY`|Value must be a JSON array
|
||||
`Type::BOOLEAN`|Value must be a boolean ([**considered bool for GET rules**](#boolean-coercion-from-string-for-search-parameters))
|
||||
`Type::ARRAY`|Value must be a JSON array or ([**CSV for GET rules**](#csv-for-search-parameters))
|
||||
`Type::OBJECT`|Value must be a JSON object
|
||||
`Type::ENUM`|Value must be exactly one of pre-defined values ([**more information**](#typeenum))
|
||||
`Type::NULL`|Value must be null or ([**considered null for GET rules**](#null-coercion-from-string-for-search-parameters))
|
||||
`Type::NULL`|Value must be null ([**considered null for GET rules**](#null-coercion-from-string-for-search-parameters))
|
||||
|
||||
#### `Type::ENUM`
|
||||
|
||||
|
@ -136,6 +136,19 @@ Any other value will cause the `type()` rule to fail.
|
|||
> [!IMPORTANT]
|
||||
> This coercion is only applies for `Ruleset->GET()`. `Ruleset->POST()` will enforce real `true` and `type` values since it's JSON
|
||||
|
||||
#### CSV array for search parameters
|
||||
A CSV string is expected when `Type::ARRAY` is set for a GET rule.
|
||||
|
||||
*Example:*
|
||||
```
|
||||
https://example.com?typeArray=key1,key2,key3
|
||||
```
|
||||
|
||||
Any other value will cause the `type()` rule to fail.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This coercion is only applies for `Ruleset->GET()`. `Ruleset->POST()` will enforce a JSON array
|
||||
|
||||
#### Null coercion from string for search parameters
|
||||
Search parameters are read as strings, a null value is therefor coerced from an empty string `""`.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue