(msg=None)
return fn
Checks whether a value is:
        - str or unicode, and
        - composed of both alphabets and digits
Checks whether a value is:
        - str or unicode, and
        - composed of both alphabets and digits
Checks whether a value is : - str or unicode and - composed of both alphabets and digits
def StrictlyAlphanumeric(msg=None):
    '''
    Checks whether a value is:
        - str or unicode, and
        - composed of both alphabets and digits
    '''
    def fn(value):
        if not (
            isinstance(value, basestring) and
            value.isalnum() and not
            value.isdigit() and not
            value.isalpha()
        ):
            raise Invalid(msg or (
                'Invalid input <{0}>; expected an integer'.format(value))
            )
        else:
            return value
    return fn
def StrictlyAlphanumeric ( msg = None ) : def fn ( value ) : if not ( isinstance ( value , basestring ) and value . isalnum ( ) and not value . isdigit ( ) and not value . isalpha ( ) ) : raise Invalid ( msg or ( 'Invalid input <{0}>; expected an integer' . format ( value ) ) ) else : return value return fn