(code)
return True
Check if the passsed custom code/secret key is a valid input.
    Allowed input codes are:
        1. characters are [A-Za-z0-9]
        2. 6 characters long
Check if the passsed custom code/secret key is a valid input.
    Allowed input codes are:
        1. characters are [A-Za-z0-9]
        2. 6 characters long
Check if the passsed custom code / secret key is a valid input . Allowed input codes are : 1 . characters are [ A - Za - z0 - 9 ] 2 . 6 characters long
def is_valid_custom_code_or_secret(code):
    """Check if the passsed custom code/secret key is a valid input.
    Allowed input codes are:
        1. characters are [A-Za-z0-9]
        2. 6 characters long"""
    if len(code) > MAX_SHORT_CODE_LEN:
        raise ValidationError(INVALID_CUSTOM_CODE_ERROR)
    for c in code:
        if c not in VALID_INPUT_CHARS:
            raise ValidationError(INVALID_CUSTOM_CODE_ERROR)
    return True
def is_valid_custom_code_or_secret ( code ) : if len ( code ) > MAX_SHORT_CODE_LEN : raise ValidationError ( INVALID_CUSTOM_CODE_ERROR ) for c in code : if c not in VALID_INPUT_CHARS : raise ValidationError ( INVALID_CUSTOM_CODE_ERROR ) return True