SimPEG.utils.validate_string#
- SimPEG.utils.validate_string(property_name, var, string_list=None, case_sensitive=False)[source]#
Validate a string property
- Parameters:
- property_name
str
The name of the property being set
- var
str
The input variable
- string_list
list
ortuple
of
str
,optional
Provide a list of acceptable strings, if an individual item is also a list, the extra parameters are interpreted as aliases for the first item, which is then returned.
- case_sensitivebool, default:
False
If
True
and string_list is notNone
, the string comparison is case-sensitive
- property_name
- Returns:
str
Returns the input argument var once validated