Validate the directives that appear at a vertex field.
499198
def validate_vertex_directives(directives):
    """"""
    for directive_name in six.iterkeys(directives):
        if directive_name in PROPERTY_ONLY_DIRECTIVES:
            raise GraphQLCompilationError(
                u'Found property-only directive {} set on vertex.'.format(directive_name))
946924
def validate(self):
        """"""
        super().validate()
        message_dsm = 'Matrix at [%s:%s] is not an instance of '\
                      'DesignStructureMatrix or MultipleDomainMatrix.'
        message_ddm = 'Matrix at [%s:%s] is not an instance of '\
                      'DomainMappingMatrix or MultipleDomainMatrix.'
        messages = []
        for i, row in enumerate(self.data):
            for j, cell in enumerate(row):
                if i == j:
                    if not isinstance(cell, (
                            DesignStructureMatrix, MultipleDomainMatrix)):
                        messages.append(message_dsm % (i, j))
                elif not isinstance(cell, (
                        DomainMappingMatrix, MultipleDomainMatrix)):
                    messages.append(message_ddm % (i, j))
        if messages:
            raise self.error('\n'.join(messages))
413433
def _validateAttrs(self, keys):
        """"""
        badAttrsMsg = ""
        for k in keys:
            if k not in self.attrs:
                badAttrsMsg += "Attribute key '%s' is not a valid attribute"%(k)
        if badAttrsMsg:
            raise ValueError("Encountered invalid attributes.  ALLOWED: %s%s%s"\
                %(list(self.attrs), os.linesep, badAttrsMsg))
499905
function validateAttrs(attrs) {
            const attributes = groupByName(attrs)
            attributes.forEach((nodes, name) => {
                validateNameGroup(nodes, name)
            })
        }
298382
def validate_root_vertex_directives(root_ast):
    """"""
    directives_present_at_root = set()
    for directive_obj in root_ast.directives:
        directive_name = directive_obj.name.value

        if is_filter_with_outer_scope_vertex_field_operator(directive_obj):
            raise GraphQLCompilationError(u'Found a filter directive with an operator that is not'
                                          u'allowed on the root vertex: {}'.format(directive_obj))

        directives_present_at_root.add(directive_name)

    disallowed_directives = directives_present_at_root & VERTEX_DIRECTIVES_PROHIBITED_ON_ROOT
    if disallowed_directives:
        raise GraphQLCompilationError(u'Found prohibited directives on root vertex: '
                                      u'{}'.format(disallowed_directives))
304049
def validate(self):
        """"""
        for name, field in self:
            try:
                field.validate_for_object(self)
            except ValidationError as error:
                raise ValidationError(
                    "Error for field '{name}'.".format(name=name),
                    error,
                )
259266
@SuppressWarnings("unchecked")
    void validateResourceFields() {

        for (Component c : m_resources) {
            if (c instanceof CmsRemovableFormRow<?>) {
                ((CmsRemovableFormRow<CmsPathSelectField>)c).getInput().validate();
            }
        }
    }
638363
def is_specified_directive(directive: GraphQLDirective):
    """"""
    return isinstance(directive, GraphQLDirective) and any(
        specified_directive.name == directive.name
        for specified_directive in specified_directives
    )
551506
def validate(mcs, bases, attributes):
        """"""
        if bases[0] is object:
            return None
        mcs.check_model_cls(attributes)
        mcs.check_include_exclude(attributes)
        mcs.check_properties(attributes)
949920
function validateExclusion(attr, conf, err) {
    if (nullCheck.call(this, attr, conf, err)) return;

    if (~conf.in.indexOf(this[attr])) {
        err();
    }
}
1158542
function validateIfDeprecated (directives) {
  if (!directives.length) {
    return false
  }

  return directives.some(directive => directive.name.value === 'deprecated')
}
273053
def validate(self):
        """"""
        if not isinstance(self.fold_scope_location, FoldScopeLocation):
            raise TypeError(u'Expected FoldScopeLocation fold_scope_location, got: {} {}'.format(
                type(self.fold_scope_location), self.fold_scope_location))

        if self.fold_scope_location.field is None:
            raise ValueError(u'Expected FoldScopeLocation at a field, but got: {}'
                             .format(self.fold_scope_location))

        if self.fold_scope_location.field == COUNT_META_FIELD_NAME:
            if not GraphQLInt.is_same_type(self.field_type):
                raise TypeError(u'Expected the _x_count meta-field to be of GraphQLInt type, but '
                                u'encountered type {} instead: {}'
                                .format(self.field_type, self.fold_scope_location))
        else:
            if not isinstance(self.field_type, GraphQLList):
                raise ValueError(u'Invalid value of "field_type" for a field that is not '
                                 u'a meta-field, expected a list type but got: {} {}'
                                 .format(self.field_type, self.fold_scope_location))

            inner_type = strip_non_null_from_type(self.field_type.of_type)
            if isinstance(inner_type, GraphQLList):
                raise GraphQLCompilationError(
                    u'Outputting list-valued fields in a @fold context is currently not supported: '
                    u'{} {}'.format(self.fold_scope_location, self.field_type.of_type))
519826
def _validate_item(self, validator, data_item, position, includes):
        
        errors = []

        # Optional field with optional value? Who cares.
        if data_item is None and validator.is_optional and validator.can_be_none:
            return errors

        errors += self._validate_primitive(validator, data_item, position)

        if errors:
            return errors

        if isinstance(validator, val.Include):
            errors += self._validate_include(validator, data_item,
                                             includes, position)

        elif isinstance(validator, (val.Map, val.List)):
            errors += self._validate_map_list(validator, data_item,
                                              includes, position)

        elif isinstance(validator, val.Any):
            errors += self._validate_any(validator, data_item,
                                         includes, position)

        return errors
1275374
def Validate(self):
    """"""
    self._ValidateReturnedTypes()
    self._ValidatePaths()
    self._ValidateType()
    self._ValidateRequiredAttributes()
    self._ValidateCommandArgs()
570107
private void validateKeyscope(final Attributes atts) {
        final String keys = atts.getValue(ATTRIBUTE_NAME_KEYSCOPE);
        if (keys != null) {
            for (final String key : keys.trim().split("\\s+")) {
                if (!isValidKeyName(key)) {
                    logger.error(MessageUtils.getMessage("DOTJ059E", key).toString());
                }
            }
        }
    }
351127
def _validate_items(self, items, field, values):
        
        if len(items) != len(values):
            self._error(field, errors.ITEMS_LENGTH, len(items), len(values))
        else:
            schema = dict(
                (i, definition) for i, definition in enumerate(items)
            )  # noqa: E501
            validator = self._get_child_validator(
                document_crumb=field,
                schema_crumb=(field, 'items'),  # noqa: E501
                schema=schema,
            )
            if not validator(
                dict((i, value) for i, value in enumerate(values)),
                update=self.update,
                normalize=False,
            ):
                self._error(field, errors.BAD_ITEMS, validator._errors)
216304
def validate(self):
        """"""
        if not isinstance(self.direction, six.string_types):
            raise TypeError(u'Expected string direction, got: {} {}'.format(
                type(self.direction).__name__, self.direction))

        validate_edge_direction(self.direction)
        validate_safe_string(self.edge_name)

        if not isinstance(self.optional, bool):
            raise TypeError(u'Expected bool optional, got: {} {}'.format(
                type(self.optional).__name__, self.optional))

        if not isinstance(self.within_optional_scope, bool):
            raise TypeError(u'Expected bool within_optional_scope, got: {} '
                            u'{}'.format(type(self.within_optional_scope).__name__,
                                         self.within_optional_scope))