def validate_project_element_name(name):
    """"Validate name for a test, page or suite.
    `name` must be a relative dot path from the base element folder.
    """
    errors = []
    parts = name.split('.')
    last_part = parts.pop()
    for part in parts:
        if len(part) == 0:
            errors.append('Directory name cannot be empty')
            break
    if len(last_part) == 0:
        errors.append('File name cannot be empty')
    for c in name:
        if not c.isalnum() and c not in ['_', '.']:
            errors.append('Only letters, numbers and underscores are allowed')
            break
    return errors
