Valid slugs

Is it valid for a slug to contain upper case letters? The input 'NOT-AS-UPPERCASE' to slug() is returned as a valid slug.
Also, the presence of hyphens(-) at the beginning or end of the string isn't handled. For instance, the input '-no-no-no-' to slug() should return False, while it returns a True.