Skip to content

Commit 16978eb

Browse files
Adds strict param for numeric rule (#10629)
* Adds strict param for numeric rule * Update validation.md * Update validation.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 8e8a37f commit 16978eb

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
@@ -1968,6 +1968,12 @@ The field under validation may be `null`.
19681968

19691969
The field under validation must be [numeric](https://www.php.net/manual/en/function.is-numeric.php).
19701970

1971+
You may use the `strict` parameter to only consider the field valid if its value is an integer or float type. Numeric strings will be considered invalid:
1972+
1973+
```php
1974+
'amount' => 'numeric:strict'
1975+
```
1976+
19711977
<a name="rule-present"></a>
19721978
#### present
19731979

0 commit comments

Comments
 (0)