'Does a basic check that the entries conform to this descriptor type\'s
constraints.
:param dict entries: keyword => (value, pgp key) entries
:raises: **ValueError** if an issue arises in validation'

def _check_constraints(self, entries):

    for keyword in self._required_fields():
        if (keyword not in entries):
            raise ValueError(("Descriptor    must    have    a    '%s'    entry" % keyword))
    for keyword in self._single_fields():
        if ((keyword in entries) and (len(entries[keyword]) > 1)):
            raise ValueError(("The    '%s'    entry    can    only    appear    once    in    a    descriptor" % keyword))
    expected_first_keyword = self._first_keyword()
    if (expected_first_keyword and (expected_first_keyword != list(entries.keys())[0])):
        raise ValueError(("Descriptor    must    start    with    a    '%s'    entry" % expected_first_keyword))
    expected_last_keyword = self._last_keyword()
    if (expected_last_keyword and (expected_last_keyword != list(entries.keys())[(-1)])):
        raise ValueError(("Descriptor    must    end    with    a    '%s'    entry" % expected_last_keyword))
    if (not self.exit_policy):
        raise ValueError("Descriptor    must    have    at    least    one    'accept'    or    'reject'    entry")
