Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Taking your approach on designing things actually makes it fun, more natural, and overall easier.

— Dominik, Developer

is_alphanumeric Modifier

Returns true if string contains only alphanumeric characters. Punctuation, whitespace, and another other special characters will cause a false.

secret_phrase: abc123
even_more_secret_phrase: abc123!@#
{{ if secret_phrase | is_alphanumeric }}
{{ if even_more_secret_phrase | is_alphanumeric }}
@if (Statamic::modify($secret_phrase)->isAlphanumeric()->fetch()) @endif
@if (Statamic::modify($even_more_secret_phrase)->isAlphanumeric()->fetch()) @endif
true
false
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →