-
- bool includes = (m_validatorStyle & wxFILTER_INCLUDE_LIST) != 0;
- if ( includes || (m_validatorStyle & wxFILTER_EXCLUDE_LIST) )
- {
- // if includes, it's only ok to have the members of the list,
- // otherwise it's only ok to have non-members
- ok = includes == (m_includes.Index(val) != wxNOT_FOUND);
- if ( !ok )
- {
- errormsg = _("'%s' is invalid");
- }
- }
- else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
- {
- ok = false;
-
- errormsg = _("'%s' should only contain ASCII characters.");
- }
- else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
- {
- ok = false;
-
- errormsg = _("'%s' should only contain alphabetic characters.");
- }
- else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
- {
- ok = false;
-
- errormsg = _("'%s' should only contain alphabetic or numeric characters.");
- }
- else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val))