- case wxFILTER_NONE:
- // nothing to do...
- break;
-
- case wxFILTER_INCLUDE_LIST:
- if ( m_includes.Index(val) == wxNOT_FOUND )
- errormsg = _("'%s' is invalid");
- break;
-
- case wxFILTER_EXCLUDE_LIST:
- if ( m_excludes.Index(val) != wxNOT_FOUND )
- errormsg = _("'%s' is invalid");
- break;
-
- case wxFILTER_ASCII:
- if ( !val.IsAscii() )
- errormsg = _("'%s' should only contain ASCII characters.");
- break;
-
- case wxFILTER_ALPHA:
- if ( !wxStringCheck<wxIsalpha>(val) )
- errormsg = _("'%s' should only contain alphabetic characters.");
- break;
-
- case wxFILTER_ALPHANUMERIC:
- if ( !wxStringCheck<wxIsalnum>(val) )
- errormsg = _("'%s' should only contain alphabetic or numeric characters.");
- break;
-
- case wxFILTER_SIMPLE_NUMBER:
- if ( !wxStringCheck<wxIsdigit>(val) )
- errormsg = _("'%s' should be numeric.");
- break;
-
- case wxFILTER_NUMERIC:
- if ( !wxIsNumeric(val) )
- errormsg = _("'%s' should be numeric.");
- break;
-
- case wxFILTER_INCLUDE_CHAR_LIST:
- if ( !ContainsOnlyIncludedCharacters(val) )
- errormsg = _("'%s' is invalid");
- break;
-
- case wxFILTER_EXCLUDE_CHAR_LIST:
- if ( ContainsExcludedCharacters(val) )
- errormsg = _("'%s' is invalid");
- break;
-
- default:
- wxFAIL_MSG("invalid text validator style");