int len = strlen(ch);
for (int i = 0; i < len; ++i)
{
+ // if there is a list of allowed characters, forbid all other
+ if (me.allowedCharacters != string_null
+ && strstrofs(me.allowedCharacters, substring(ch, i, 1), 0) == -1) return;
+
+ // don't allow forbidden characters
if (strstrofs(me.forbiddenCharacters, substring(ch, i, 1), 0) > -1) return;
- if (strstrofs(me.allowedCharacters, substring(ch, i, 1), 0) == -1) return;
}
if (me.maxLength > 0)
{