feat(doc): add type union to README

This commit is contained in:
Victor Westerlund 2023-11-29 08:28:42 +01:00 committed by GitHub
parent 47987b9d97
commit 3059fe90e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.
> [!TIP]
> Allow multiple types (union) by chaining multiple `type()` methods
> ```php
> // Example
> Rules->type(Type::NUMBER)->type(Type::NULL);
> ```
### Types
Type|Description
--|--