SimPEG.utils.validate_string#
- SimPEG.utils.validate_string(property_name, var, string_list=None, case_sensitive=False)[source]#
- Validate a string property - Parameters
- property_namestr
- The name of the property being set 
- varstr
- The input variable 
- string_listlistortupleofstr,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 - Trueand string_list is not- None, the string comparison is case-sensitive
 
- property_name
- Returns
- str
- Returns the input argument var once validated