Skip to content

Commit 133fd4a

Browse files
committed
integer strict
1 parent 81b78b5 commit 133fd4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

validation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,12 @@ The field under validation must be an array having at least one of the given _va
18241824

18251825
The field under validation must be an integer.
18261826

1827+
You may use the `strict` parameter to only consider the field valid if its type is `integer`. Strings with integer values will be considered invalid:
1828+
1829+
```php
1830+
'age' => 'integer:strict'
1831+
```
1832+
18271833
> [!WARNING]
18281834
> This validation rule does not verify that the input is of the "integer" variable type, only that the input is of a type accepted by PHP's `FILTER_VALIDATE_INT` rule. If you need to validate the input as being a number please use this rule in combination with [the `numeric` validation rule](#rule-numeric).
18291835

0 commit comments

Comments
 (0)