Reference

Guide

V::url()

Checks for a valid Url

V::url($value): bool

Parameters

Name Type Default Description
$value

Return type

bool

In your code

if(V::url('https://getkirby.com')) {
  echo 'Yay, valid!';
}

In fields

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

Source code

kirby/src/Toolkit/V.php#L515