Is Alphanumeric Modifier
Returns true
if string contains only alphanumeric characters. Punctuation, whitespace, and another other special characters will cause a false
.
secret_phrase: abc123even_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
truefalse
Docs Feedback
Submit improvements, related content, or suggestions through Github.
Betterify this page