V::max()
Checks if the value does not exceed the maximum value
V::max($value, float $max): bool
Parameters
Name | Type | Default | Description |
---|---|---|---|
$value |
mixed |
|
|
$max |
float |
|
Return type
bool
In your code
if(v::max(5, 10)) {
echo 'Yay, valid!';
}
In fields
fields:
example:
label: Example field
type: text
validate:
max: 10