-
- bool includeList = (m_validatorStyle & wxFILTER_INCLUDE_LIST) != 0;
- if ( includeList || (m_validatorStyle & wxFILTER_EXCLUDE_LIST) )
- {
- // if includeList, it's only ok to have the members of the list,
- // otherwise it's only ok to have non-members
- ok = includeList == m_includeList.Member(val);
- 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))
- {
- ok = false;
-
- errormsg = _("'%s' should be numeric.");
- }
- else if ( (m_validatorStyle & wxFILTER_INCLUDE_CHAR_LIST) && !IsInCharIncludeList(val))
- {
- //it's only ok to have the members of the list
- errormsg = _("'%s' is invalid");
- ok = false;
- }
- else if ( (m_validatorStyle & wxFILTER_EXCLUDE_CHAR_LIST) && !IsNotInCharExcludeList(val))