def _validateParamsFor_validateChoice(choices, blank=False, strip=None, allowlistRegexes=None, blocklistRegexes=None,<EOL>numbered=False, lettered=False, caseSensitive=False, excMsg=None):
if not isinstance(caseSensitive, bool):<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>len(choices)<EOL><DEDENT>except:<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>if blank == False and len(choices) < <NUM_LIT:2>:<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>elif blank == True and len(choices) < <NUM_LIT:1>:<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>_validateGenericParameters(blank=blank, strip=strip, allowlistRegexes=None, blocklistRegexes=blocklistRegexes)<EOL>for choice in choices:<EOL><INDENT>if not isinstance(choice, str):<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>' % (_errstr(choice)))<EOL><DEDENT><DEDENT>if lettered and len(choices) > <NUM_LIT>:<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>if numbered and lettered:<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>if len(choices) != len(set(choices)):<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>if not caseSensitive and len(choices) != len(set([choice.upper() for choice in choices])):<EOL><INDENT>raise PySimpleValidateException('<STR_LIT>')<EOL><DEDENT>
Raises PySimpleValidateException if the arguments are invalid. This is called by
    the validateChoice() function to check its arguments. This code was
    refactored out to a separate function so that the PyInputPlus module (or
    other modules) could check their parameters' arguments for inputChoice().