feat(doc): add default() to README

This commit is contained in:
Victor Westerlund 2023-11-29 06:54:16 +01:00 committed by GitHub
parent 9a525e45c7
commit 6760bac254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);