'If field is provided ensure the value is valid.'

def validate(self, value):

    errors = {}
    if self.field:
        if (hasattr(value, 'iteritems') or hasattr(value, 'items')):
            sequence = value.iteritems()
        else:
            sequence = enumerate(value)
        for (k, v) in sequence:
            try:
                self.field._validate(v)
            except ValidationError as error:
                errors[k] = (error.errors or error)
            except (ValueError, AssertionError) as error:
                errors[k] = error
        if errors:
            field_class = self.field.__class__.__name__
            self.error(('Invalid    %s    item    (%s)' % (field_class, value)), errors=errors)
    if (self.required and (not value)):
        self.error('Field    is    required    and    cannot    be    empty')
