<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_entries(fields, # type: Sequence[FieldSpec] data # type: Sequence[Sequence[str]] ):
 """ Validate the `data` entries according to the specification in `fields`. :param fields: The `FieldSpec` objects forming the specification. :param data: The data to validate. :raises EntryError: When an entry is not valid according to its :class:`FieldSpec`. """

    validators = [f.validate for f in fields]

    for i, row in enumerate(data):
        for entry, v in zip(row, validators):
            try:
                v(entry)
            except InvalidEntryError as e:
                msg = (
                    'Invalid entry in row {row_index}, column '
                    "'{column_name}'. {original_message}"
                ).format(
                    row_index=i,
                    column_name=cast(FieldSpec, e.field_spec).identifier,
                    original_message=e.args[0])
                e_invalid_entry = EntryError(msg)
                e_invalid_entry.field_spec = e.field_spec
                e_invalid_entry.row_index = i
                raise_from(e_invalid_entry, e)