import six


def validate_hatch(s):
    """
    Validate a hatch pattern.
    A hatch pattern string can have any sequence of the following
    characters: ``\\ / | - + * . x o O``.

    """
    if not isinstance(s, six.text_type):
        raise ValueError("Hatch pattern must be a string")
    unique_chars = set(s)
    unknown = (unique_chars -
                set(['\\', '/', '|', '-', '+', '*', '.', 'x', 'o', 'O']))
    if unknown:
        raise ValueError("Unknown hatch symbol(s): %s" % list(unknown))
    return s