import re


def validateAlias(value):
    """Validate user alias for subfield.
    """
    if 0 == len(value):
        raise ValueError("User-specified alias for subfield not specified.")
    if re.search(r"\s", value):
        raise ValueError("User-specified alias for subfield cannot contain whitespace.")
    return value