From 6760bac254bfb5ffb67733a7de882db7dd399b58 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Wed, 29 Nov 2023 06:54:16 +0100 Subject: [PATCH] feat(doc): add default() to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b4df7a1..9e7fe39 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,12 @@ Any value that isn't an empty string will cause the `type()` rule to fail. > [!IMPORTANT] > This coercion is only applies for `Ruleset->GET()`. `Ruleset->POST()` will enforce the real `null` value since it's JSON +## `default()` +```php +Rules->default(mixed); +``` +Set superglobal property to a defined default value if the property was not provided in superglobal scope + ## `min()` ```php Rules->min(?int = null);