Validate the sorts
Throws a JoryException on failure.

@throws JoryException
967198
protected function validateSorts(): void
    {
        $sorts = $this->getArrayValue($this->joryArray, ['srt', 'sorts']);

        // No sorts set, that's ok. return.
        if (! $sorts) {
            return;
        }

        if (! is_array($sorts)) {
            throw new JoryException('The sorts parameter should be an array. (Location: '.$this->address.'sorts)');
        }

        foreach ($sorts as $sort) {
            if (! is_string($sort)) {
                throw new JoryException('A sort item must be a string. (Location: '.$this->address.'sorts)');
            }
        }
    }
37102
public void validate() {

        if (CmsStringUtil.isEmpty(getNewPwd())) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_NEWPWD_0));
        }
        if (!getNewPwd().equals(getConfirmation())) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_NEWPWD_MISMATCH_0));
        }
    }
1221387
public void validate() throws GridConfigurationException {
    // validations occur here in the getters called on the configuration.
    try {
      configuration.getHubHost();
      configuration.getHubPort();
    } catch (RuntimeException e) {
      throw new GridConfigurationException(e.getMessage());
    }
  }
39290
private void validate(JSONObject json) throws HelloSignException {
        if (json.has("error")) {
            try {
                JSONObject error = json.getJSONObject("error");
                String message = error.getString("error_msg");
                String type = error.getString("error_name");
                throw new HelloSignException(message, getLastResponseCode(), type);
            } catch (JSONException ex) {
                throw new HelloSignException(ex);
            }
        }
    }
752367
public void validateComponents ()
    {
        // swap out our invalid array
        Object[] invalid = null;
        synchronized (this) {
            invalid = _invalid;
            _invalid = null;
        }

        // if there's nothing to validate, we're home free
        if (invalid == null) {
            return;
        }

        // validate everything therein
        int icount = invalid.length;
        for (int ii = 0; ii < icount; ii++) {
            if (invalid[ii] != null) {
                if (DEBUG) {
                    log.info("Validating " + invalid[ii]);
                }
                ((Component)invalid[ii]).validate();
            }
        }
    }
1154051
public function validate() {

		if ($this->getExternalId() === null) {
			throw new ValidationException("'externalId' can't be null", 'externalId', $this);
		}
		if ($this->getLineItems() === null) {
			throw new ValidationException("'lineItems' can't be null", 'lineItems', $this);
		}
	}
863679
public void isInvalid() {
        ValidationResult validateResult = validate();
        if (validateResult.isValid()) {
            throwAssertionError(shouldBeInvalid(actual.getSystemId()));
        }
    }
713012
protected void validate() {
    // make sure that the source uri is set correctly.
    if (mSourceUri == null) {
      throw new BuilderException("Source must be set!");
    }

    // For local resource we require caller to specify statically generated resource id as a path.
    if (UriUtil.isLocalResourceUri(mSourceUri)) {
      if (!mSourceUri.isAbsolute()) {
        throw new BuilderException("Resource URI path must be absolute.");
      }
      if (mSourceUri.getPath().isEmpty()) {
        throw new BuilderException("Resource URI must not be empty");
      }
      try {
        Integer.parseInt(mSourceUri.getPath().substring(1));
      } catch (NumberFormatException ignored) {
        throw new BuilderException("Resource URI path must be a resource id.");
      }
    }

    // For local asset we require caller to specify absolute path of an asset, which will be
    // resolved by AssetManager relative to configured asset folder of an app.
    if (UriUtil.isLocalAssetUri(mSourceUri) && !mSourceUri.isAbsolute()) {
      throw new BuilderException("Asset URI path must be absolute.");
    }
  }
66775
private void validate() {
        LibraryUtils.checkArgumentNotNull(config, "configuration is null");
        LibraryUtils.checkArgumentNotNull(exceptionHandler, "exceptionHandler is null");
        LibraryUtils.checkArgumentNotNull(progressReporter, "progressReporter is null");
        LibraryUtils.checkArgumentNotNull(sqsClient, "sqsClient is null");
        LibraryUtils.checkArgumentNotNull(sourceSerializer, "sourceSerializer is null");
    }
700435
public void validate() {
    if (time == null) {
      throw new IllegalArgumentException("missing time");
    }

    validatePOJO(time, "time");

    if (metrics == null || metrics.isEmpty()) {
      throw new IllegalArgumentException("missing or empty metrics");
    }

    final Set<String> variable_ids = new HashSet<String>();
    for (Metric metric : metrics) {
      if (variable_ids.contains(metric.getId())) {
        throw new IllegalArgumentException("duplicated metric id: "
            + metric.getId());
      }
      variable_ids.add(metric.getId());
    }

    final Set<String> filter_ids = new HashSet<String>();

    for (Filter filter : filters) {
      if (filter_ids.contains(filter.getId())) {
        throw new IllegalArgumentException("duplicated filter id: "
            + filter.getId());
      }
      filter_ids.add(filter.getId());
    }
    
    for (Expression expression : expressions) {
      if (variable_ids.contains(expression.getId())) {
        throw new IllegalArgumentException("Duplicated variable or expression id: "
            + expression.getId());
      }
      variable_ids.add(expression.getId());
    }

    validateCollection(metrics, "metric");

    if (filters != null) {
      validateCollection(filters, "filter");
    }

    if (expressions != null) {
      validateCollection(expressions, "expression");
    }

    validateFilters();
    
    if (expressions != null) {
      validateCollection(expressions, "expression");
      for (final Expression exp : expressions) {
        if (exp.getVariables() == null) {
          throw new IllegalArgumentException("No variables found for an "
              + "expression?! " + JSON.serializeToString(exp));
        }
        
        for (final String var : exp.getVariables()) {
          if (!variable_ids.contains(var)) {
            throw new IllegalArgumentException("Expression [" + exp.getExpr() 
              + "] was missing input " + var);
          }
        }
      }
    }
  }
1193781
public void validate(byte[] buffer, int rowOffset, int rowHead, int blobTail)
  {
    for (Column column : columns()) {
      column.validate(buffer, rowOffset, rowHead, blobTail);
    }
  }
708596
@JsonIgnore
    public void validate() throws OpsGenieClientValidationException {
        if (apiKey == null)
            throw OpsGenieClientValidationException.missingMandatoryProperty(OpsGenieClientConstants.API.API_KEY);
    }
826867
@Override
	public void validate() throws HostNameException {
		if(parsedHost != null) {
			return;
		}
		if(validationException != null) {
			throw validationException;
		}
		synchronized(this) {
			if(parsedHost != null) {
				return;
			}
			if(validationException != null) {
				throw validationException;
			}
			try {
				parsedHost = getValidator().validateHost(this);
			} catch(HostNameException e) {
				validationException = e;
				throw e;
			}
		}
	}
1215246
@Override
    public void validate() {
        if (value == null) {
            throw new NoValueGivenException(getPath());
        }

        if (valids.size() != 0) {
            boolean ok = false;
            String valString = (value != null) ? value.toString() : "";

            for (int i = 0; i < valids.size(); i++) {
                if (valids.get(i).equals(valString)) {
                    ok = true;
                    break;
                }
            }

            if (!ok) {
                throw new NoValidValueException(getPath(), valString);
            }
        }

        setValid(true);
    }
233366
public function validate() {

		if ($this->getConsumedUnits() === null) {
			throw new ValidationException("'consumedUnits' can't be null", 'consumedUnits', $this);
		}
		if ($this->getExternalId() === null) {
			throw new ValidationException("'externalId' can't be null", 'externalId', $this);
		}
		if ($this->getMetric() === null) {
			throw new ValidationException("'metric' can't be null", 'metric', $this);
		}
		if ($this->getSubscription() === null) {
			throw new ValidationException("'subscription' can't be null", 'subscription', $this);
		}
	}
170162
@Override
    public void validate() throws Exception {
        super.validate();
        this.parse();
        Assert.assertTrue("The upper date should be after the initial date",
                this.upper.after(this.lower));
    }
699546
private void validate() {
        try {
            DateTime ts;

            ts = current.getTimestamp();
            for (TimeSeriesCollection b : backward) {
                if (b.getTimestamp().isAfter(ts))
                    throw new IllegalArgumentException("backwards collection must be before current and be ordered in reverse chronological order");
                ts = b.getTimestamp();
            }

            ts = current.getTimestamp();
            for (TimeSeriesCollection f : forward) {
                if (f.getTimestamp().isBefore(ts))
                    throw new IllegalArgumentException("forwards collection must be after current and be ordered in chronological order");
                ts = f.getTimestamp();
            }
        } catch (IllegalArgumentException ex) {
            LOG.log(Level.SEVERE, "programmer error in creating interpolated TimeSeriesCollection", ex);
            final List<DateTime> backward_ts = backward.stream().map(TimeSeriesCollection::getTimestamp).collect(Collectors.toList());
            final List<DateTime> forward_ts = forward.stream().map(TimeSeriesCollection::getTimestamp).collect(Collectors.toList());
            LOG.log(Level.INFO, "current = {0}, backward = {1}, forward = {2}", new Object[]{current.getTimestamp(), backward_ts, forward_ts});
            throw ex;
        }
    }