I don't think there's a single pre-made function for it, but you could compose two phobos functions (which imo is just as good!):
import std.algorithm, std.ascii;
bool good = all!isAlphaNum(your_string);
I think that does unnecessary utf decoding, so it wouldn't be maximally efficient but that's likely irrelevant for this anyway since the strings are surely short. But if that matters to you perhaps using .representation
(from std.string iirc) or foreach(char c; your_string) isAlphaNum(c);
yourself would be a bit faster.