Validates an array of attributes, recursing if any nested attributes are encountered.
438121
def validate(type, plugin, attributes, attribute_namespace = [])
      attributes.each do |attribute|
        if attribute.children?
          validate(type, plugin, attribute.children, attribute_namespace.clone.push(attribute.name))
        elsif attribute.required? && attribute.value.nil?
          registry.logger.fatal I18n.t(
            "lita.config.missing_required_#{type}_attribute",
            type => plugin.namespace,
            attribute: full_attribute_name(attribute_namespace, attribute.name)
          )
          abort
        end
      end
    end
631190
def validate_required_attributes!
      unless required_attributes?
        blank_attribute = required_attributes.detect { |attr| self[attr].nil? || self[attr].empty? }

        raise ValidationError, "#{blank_attribute} can't be blank"
      end
    end
224557
def _validate_empty_attributes(self, attributes):
        """"""
        attrs_to_check = set(self._required) & set(attributes)
        for attr in attrs_to_check:
            value = getattr(self, attr)  # We should always have a value here
            if value is None or value == "":
                raise ValueError(
                    "Attribute %s cannot be None or an empty string since it is required." % attr
                )
1282501
def validate_casted_arrays
      result = true
      array_casted_properties = self.class.properties.select { |property| property.casted && property.type.instance_of?(Array) }
      array_casted_properties.each do |property|
        casted_values = self.send(property.name)
        next unless casted_values.is_a?(Array) && casted_values.first.respond_to?(:valid?)
        casted_values.each do |value|
          result = (result && value.valid?) if value.respond_to?(:valid?)
        end
      end
      result
    end
946754
def _validate_sections(cls, sections):
        """"""
        names = []
        for section in sections:

            if not hasattr(section, 'name'):
                raise ConfigurationError('`sections` attribute requires a list of Section')

            name = section.name
            if name in names:
                raise ConfigurationError('`%s` section name must be unique' % name)

            names.append(name)
1163748
public function validates()
    {
        $currentAttributeValues = array();

        if ($this->isBound()) {
            foreach ($this->getAttributeNames() as $name) {
                $currentAttributeValues[$name] = $this->{$name};
            }
        }

        return $this->validate(array(
            $this->getInputName() => $currentAttributeValues
        ));
    }
183484
function (Schema, data) {
		var schemaKey = _.keys(data)[0];

		var mainSchema = this._parseSchemaHashKey(Schema, schemaKey);

		iterate.recursiveEach(data[schemaKey], mainSchema, function (v, k, schema) {
			if (/^=+$/.test(k)) {
				schema.validate(v);
				return;
			}

			schema = this._parseAndAddField(Schema, k, schema);
			if (_.isArray(v)) {
				schema.validate(v);
				return;
			}

			return schema;
		}, this);

		return mainSchema;
	}
687171
def validate_attributes!(attributes)
      return attributes if attributes.blank?
      invalid_properties = attributes.keys.map(&:to_s) - self.attributes.keys
      invalid_properties.reject! { |name| self.respond_to?("#{name}=") }
      fail UndefinedPropertyError, "Undefined properties: #{invalid_properties.join(',')}" if !invalid_properties.empty?
    end
1178430
def validate_values(values)
      values.each do |key, value|
        if value.kind_of?(Hash)
          validate_values(value) # recursive call
        else
          validate_key(key, value)
        end
      end
    end
202477
def validate_children
      child_associations.each do |collection|
        if collection.dirty?
          collection.each do |child|
            unless child.valid?
              relationship_errors = (errors[collection.relationship.name] ||= [])
              unless relationship_errors.include?(child.errors)
                relationship_errors << child.errors
              end
            end
          end
        end
      end
    end
712015
private void validateAttributeValues(final String qName, final Attributes atts) {
        if (validateMap.isEmpty()) {
            return;
        }
        for (int i = 0; i < atts.getLength(); i++) {
            final QName attrName = new QName(atts.getURI(i), atts.getLocalName(i));
            final Map<String, Set<String>> valueMap = validateMap.get(attrName);
            if (valueMap != null) {
                Set<String> valueSet = valueMap.get(qName);
                if (valueSet == null) {
                    valueSet = valueMap.get("*");
                }
                if (valueSet != null) {
                    final String attrValue = atts.getValue(i);
                    final String[] keylist = attrValue.trim().split("\\s+");
                    for (final String s : keylist) {
                        if (!StringUtils.isEmptyString(s) && !valueSet.contains(s)) {
                            logger.warn(MessageUtils.getMessage("DOTJ049W",
                                    attrName.toString(), qName, attrValue, StringUtils.join(valueSet, COMMA)).toString());
                        }
                    }
                }
            }
        }
    }
825147
function(attrs, options) {
      if (attrs instanceof Model) return attrs;
      options = options ? _.clone(options) : {};
      options.collection = this;
      var model = new this.model(attrs, options);
      if (!model.validationError) return model;
      this.trigger('invalid', this, model.validationError, options);
      return false;
    }
82568
function(attrs, options) {
    var validationErrors = BaseModel.__super__.validate.apply(this, arguments);
    if (validationErrors) return new ValidationError({
      errors: validationErrors
    });
  }
617388
function(model, attrConfig, value, computed, validators, depth) {
      var attr, indices;

      if (_.isArray(attrConfig)) {
        return _.reduce(attrConfig, function(memo, nestedAttrConfig) {
          memo.push(validateWithOpenArrayHelper(model, nestedAttrConfig, value, computed, validators, depth + 1));
          return memo;
        }, []);
      } else {
        indices = attrConfig.index;
        attr = attrConfig.attr;
        // if the value wasn't passed in and the attribute is nested, get the value
        if (_.isUndefined(value) && isNestedAttr(attr)) {
          value = model.get(attr);
        }
        return invokeValidator(validators, model, value, attr, computed, indices);
      }
    }
994654
def _validated(self, data):
        """"""
        for sub in self.schemas:
            data = sub(data)
        return data
948262
def _validate_required(self, attributes):
        """"""
        required_fulfilled = set(self._required).issubset(set(attributes))
        if not required_fulfilled:
            raise ValueError(
                "Not all required attributes fulfilled. Required: {required}".format(required=set(self._required))
            )
1290389
protected function validateAttributesToLdap(array $attributes)
    {
        if (!$this->schema) {
            return;
        }
        $missing = [];

        foreach ($this->schema->getRequiredAttributes() as $attribute) {
            if (!array_key_exists(strtolower($attribute), array_change_key_case($attributes))) {
                $missing[] = $attribute;
            }
        }

        if (!empty($missing)) {
            throw new LogicException(
                sprintf('The following required attributes are missing: %s', implode(', ', $missing))
            );
        }
    }