Skip to content

Kirby 4.4.1

alphanum

Valid: a-z | A-Z | 0-9

V::alphanum($value, bool $unicode = false): bool

Parameters

Name Type Default
$value * mixed
$unicode bool false

Return type

bool

In your code

if(V::alphanum($input)) {
  echo 'Yay, valid!';
}

In fields

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