'validation that is done at parse time, not load time'

def validate(self, all_vars=dict()):

    if (not self._validated):
        for (name, attribute) in iteritems(self._valid_attrs):
            method = getattr(self, ('_validate_%s' % name), None)
            if method:
                method(attribute, name, getattr(self, name))
            else:
                value = getattr(self, name)
                if (value is not None):
                    if ((attribute.isa == 'string') and isinstance(value, (list, dict))):
                        raise AnsibleParserError(("The    field    '%s'    is    supposed    to    be    a    string    type,    however    the    incoming    data    structure    is    a    %s" % (name, type(value))), obj=self.get_ds())
    self._validated = True
