min.php
Table of Contents
Functions
- min() : string
- Generates the 'min:value' rule expression.
Functions
min()
Generates the 'min:value' rule expression.
min(string|int|float $value) : string
The field under this rule must have a size greater than or equal to the given number.
For string values, the size corresponds to the number of characters. For integer or float values, size corresponds to its numerical value. For an array, size corresponds to the count of the array.
If your value is numeric string, you can use the numeric rule to treat its size as a numeric value instead of the number of characters.
You can also validate the minimum size of uploaded files using this rule:
$validation = $validator->validate
([
'photo' => $_FILES['photo']
],
[
'photo' => 'required|min:1M'
]);
Parameters
- $value : string|int|float