V::alphanum()
Valid: a-z
| A-Z
| 0-9
V::alphanum($value, bool $unicode = false): bool
Parameters
Name | Type | Default | Description |
---|---|---|---|
$value |
– | ||
$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