mirror of
https://codeberg.org/reflect/reflect-rules-plugin.git
synced 2025-09-14 00:43:42 +02:00
feat(doc): add type union to README
This commit is contained in:
parent
47987b9d97
commit
3059fe90e9
1 changed files with 7 additions and 0 deletions
|
@ -87,6 +87,13 @@ Rules->type(Type);
|
||||||
|
|
||||||
Enforce a data type on the request by chaining the `type()` method and passing it one of the available enum [`Type`](#types)s as its argument.
|
Enforce a data type on the request by chaining the `type()` method and passing it one of the available enum [`Type`](#types)s as its argument.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Allow multiple types (union) by chaining multiple `type()` methods
|
||||||
|
> ```php
|
||||||
|
> // Example
|
||||||
|
> Rules->type(Type::NUMBER)->type(Type::NULL);
|
||||||
|
> ```
|
||||||
|
|
||||||
### Types
|
### Types
|
||||||
Type|Description
|
Type|Description
|
||||||
--|--
|
--|--
|
||||||
|
|
Loading…
Add table
Reference in a new issue