import re


def validate_username(username):
    """
    Validates the input username against several policies.
    
    Returns:
    error (string): an error indicating what was wrong with the username.
                    if None, the username is fine
    """
    if len(username) < 1:
        return 'user names must contain least one character.'
    elif len(username) > 12:
        return 'user names cannot contain more than twelve characters.'
    elif not username[0].isalpha():
        return 'user names must begin with alphanumeric characters.'
    elif re.search(r"\s", username):
        return 'user names cannot contain whitespace.'
    else:
        return None