max
Checks if the value does not exceed the maximum value
V::max($value, float $max): bool
Parameters
Name | Type | Default |
---|---|---|
$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