isAlphaNum

Value must contain only alpha-numeric characters (a … z, A … Z, 0 … 9)

@safe
@constraint
struct isAlphaNum {}

Members

Functions

check
bool check(T s)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

errorMessage
string errorMessage;
Undocumented in source.

Examples

assert(test!isAlphaNum("abcdefghijklmnopqrstuvwxyz"));
assert(test!isAlphaNum("ABCDEFGHIUJKLMNOPQRSTUVXYZ"));
assert(test!isAlphaNum("A12"));
assert(test!isAlphaNum("Az12"));
assert(!test!isAlphaNum("Müll"));

assert(test!isAlphaNum('a'));
assert(test!isAlphaNum('A'));
assert(test!isAlphaNum('9'));
assert(!test!isAlphaNum("\xFF"));

Meta