Skip to content

Kirby 3.9.8

size

Checks that the value has the given size

V::size($value, $size, $operator = '=='): bool

Parameters

Name Type Default
$value * mixed
$size * mixed
$operator mixed '=='

Return type

bool

In your code

if(V::size(F::size('/my/file.jpg'), 12121912)) {
  echo 'Yay, valid!';
}

In fields

fields:
  example:
    label: Example field
    type: text
    validate:
      size: 12121912