(fragment, require=False)
return is_valid(fragment, misc.FRAGMENT_MATCHER, require)
Determine if the fragment component is valid.

    :param str fragment:
        The fragment string to validate.
    :param bool require:
        (optional) Set to ``True`` to require the presence of a fragment.
    :returns:
        ``True`` if the fragment is valid. ``False`` otherwise.
    :rtype:
        bool
Determine if the fragment component is valid.
Determine if the fragment component is valid .
def fragment_is_valid(fragment, require=False):
    """Determine if the fragment component is valid.

    :param str fragment:
        The fragment string to validate.
    :param bool require:
        (optional) Set to ``True`` to require the presence of a fragment.
    :returns:
        ``True`` if the fragment is valid. ``False`` otherwise.
    :rtype:
        bool
    """
    return is_valid(fragment, misc.FRAGMENT_MATCHER, require)
def fragment_is_valid ( fragment , require = False ) : return is_valid ( fragment , misc . FRAGMENT_MATCHER , require )