From 3059fe90e949e68f2aaeeffed9049d731acf8c14 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Wed, 29 Nov 2023 08:28:42 +0100 Subject: [PATCH] feat(doc): add type union to README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 9e7fe39..c822625 100644 --- a/README.md +++ b/README.md @@ -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 --|--