Skip to content

Kirby 4.4.1

ip

Checks for a valid IP address

V::ip($value): bool

Parameters

Name Type Default
$value * mixed

Return type

bool

In your code

if(V::ip('127.0.0.1')) {
  echo 'Yay, valid!';
}

In fields

fields:
  example:
    label: Example field
    type: text
    validate: ip