Skip to content Skip to footer navigation
You are reading the docs for an old version of Statamic. Consider upgrading to Statamic 6.

Is Alpha Modifier

Returns true if string contains only alphabetic characters. Numbers, punctuation, whitespace, and another other special characters will cause a false.

secret_phrase: abcdefg
even_more_secret_phrase: abc123
{{ if secret_phrase | is_alpha }}
{{ if even_more_secret_phrase | is_alpha }}
@if (Statamic::modify($secret_phrase)->isAlpha()->fetch()) @endif
@if (Statamic::modify($even_more_secret_phrase)->isAlpha()->fetch()) @endif
true
false