Called to validate configuration parameters.

@exception XDocletException  Is not thrown
438678
public void validateOptions() throws XDocletException
    {
        if ((_databaseName == null) || (_databaseName.length() == 0)) {
            throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
                XDocletModulesOjbMessages.DATABASENAME_IS_REQUIRED));
        }
    }
130472
private function validateDtd()
    {
        $libxmlUseInternalErrors = libxml_use_internal_errors(true);
        $dom = $this->writeXml();

        $secureDtdEntityResolver = new SecureDtdEntityResolver();
        $dtd = $secureDtdEntityResolver->resolveEntity($dom->doctype);


        $systemId = 'data://text/plain;base64,'.base64_encode($dtd);

        $creator = new DOMImplementation;
        $doctype = $creator->createDocumentType(
            static::DOCUMENT_TYPE_QUALIFIED_NAME,
            static::DOCUMENT_TYPE_PUBLIC_ID,
            $systemId
        );
        $new = $creator->createDocument('', '', $doctype);

        $oldNode = $dom->getElementsByTagName(static::DOCUMENT_TYPE_QUALIFIED_NAME)->item(0);
        $newNode = $new->importNode($oldNode, true);
        $new->appendChild($newNode);

        if (!$new->validate()) {
            /** @var LibXMLError[] $errors */
            $errors = libxml_get_errors();
            $errMsgStack = [];
            foreach ($errors as $error) {
                $errMsgStack[] = $error->message;
            }
            $errMsg = implode(" \n", $errMsgStack);

            libxml_use_internal_errors($libxmlUseInternalErrors);
            throw new InvalidDtdSchemaException($errMsg);
        }
        libxml_use_internal_errors($libxmlUseInternalErrors);
    }
107567
public function validate() {
    if (empty($this->fromPrefix)) {
      throw new BuildException("fromPrefix attribute is required.", $this->location);
    }

    if (empty($this->toPrefix)) {
      throw new BuildException("toPrefix attribute is required.", $this->location);
    }
  }
1065428
private void validate() {
        List<String> missingElements = new LinkedList<>();
        if (host == null) {
            missingElements.add("host");
        }

        if (protocol != null
            && !protocol.equalsIgnoreCase("noop")
            && !protocol.equalsIgnoreCase("out")) {

            if (publicKey == null) {
                missingElements.add("public key");
            }
            if (projectId == null || projectId.isEmpty()) {
                missingElements.add("project ID");
            }
        }

        if (!missingElements.isEmpty()) {
            throw new InvalidDsnException("Invalid DSN, the following properties aren't set '" + missingElements + "'");
        }
    }
81917
public function validate()
    {
        if (!$this->migrationsDatabaseName) {
            $message = 'Migrations Database Name must be configured in order to use AntiMattr migrations.';
            throw new ConfigurationValidationException($message);
        }
        if (!$this->migrationsNamespace) {
            $message = 'Migrations namespace must be configured in order to use AntiMattr migrations.';
            throw new ConfigurationValidationException($message);
        }
        if (!$this->migrationsDirectory) {
            $message = 'Migrations directory must be configured in order to use AntiMattr migrations.';
            throw new ConfigurationValidationException($message);
        }
    }
15656
@SuppressWarnings("rawtypes")
    @Override
    public void basicValidate(final String section) throws ConfigException {
        ConfigurationUtils.defaultValidate((ConfigurationComponent) this, section);
    }
802309
private void validateXmlTree(Node received, Node source, 
            XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
        switch(received.getNodeType()) {
            case Node.DOCUMENT_TYPE_NODE:
                doDocumentTypeDefinition(received, source, validationContext, namespaceContext, context);
                break;
            case Node.DOCUMENT_NODE:
                validateXmlTree(received.getFirstChild(), source.getFirstChild(),
                        validationContext, namespaceContext, context);
                break;
            case Node.ELEMENT_NODE:
                doElement(received, source, validationContext, namespaceContext, context);
                break;
            case Node.ATTRIBUTE_NODE:
                throw new IllegalStateException();
            case Node.COMMENT_NODE:
                validateXmlTree(received.getNextSibling(), source,
                        validationContext, namespaceContext, context);
                break;
            case Node.PROCESSING_INSTRUCTION_NODE:
                doPI(received);
                break;
        }
    }
593412
void validate() {
        validateCassandraParams();

        if (pageSize <= 0) {
            throw new IllegalArgumentException("pageSize cannot be zero");
        }

        

        validateConsistencyLevels();

        TableMetadata tableMetadata = fetchTableMetadata();

        validateTableMetadata(tableMetadata);
        validateAdditionalFilters(tableMetadata);

        if (!(this.isBisectModeSet && this.isSplitModeSet)) {
            if (this.isBisectModeSet) {
                if (this.bisectFactor != Constants.DEFAULT_BISECT_FACTOR
                        && !this.checkIsPowerOfTwo(this.bisectFactor)) {
                    throw new IllegalArgumentException(
                            "Bisect factor should be greater than zero and a power of 2");
                }
            } else if (this.isSplitModeSet) {
                if (this.splitSize <= 0) {
                    throw new IllegalArgumentException(
                            "The split size must be a positve integer");
                }
            } else {
                throw new IllegalArgumentException(
                        "One split mode must be defined, please choose between Split or Bisect");
            }
        } else {
            throw new IllegalArgumentException(
                    "Only one split mode can be defined, please choose between Split or Bisect");
        }
    }
712013
@Override
    public void validate() throws OpsGenieClientValidationException {
        super.validate();
        if (id == null)
            throw OpsGenieClientValidationException.missingMandatoryProperty(OpsGenieClientConstants.API.ID);
    }
1025079
@Override
    public void validate() throws OpsGenieClientValidationException {
        super.validate();
        if (getName() == null)
            throw OpsGenieClientValidationException.missingMandatoryProperty(OpsGenieClientConstants.API.NAME);
    }
234259
public void afterPropertiesSet() throws Exception {
        // try to find xml message validator in registry
        for (MessageValidator<? extends ValidationContext> messageValidator : messageValidatorRegistry.getMessageValidators()) {
            if (messageValidator instanceof DomXmlMessageValidator &&
                    messageValidator.supportsMessageType(MessageType.XML.name(), new DefaultMessage(""))) {
                xmlMessageValidator = (DomXmlMessageValidator) messageValidator;
            }
        }

        if (xmlMessageValidator == null) {
            LOG.warn("No XML message validator found in Spring bean context - setting default validator");
            xmlMessageValidator = new DomXmlMessageValidator();
            xmlMessageValidator.setApplicationContext(applicationContext);
        }
    }
189306
public function validate() {
		parent::validate();

		if ($this->getName() === null) {
			throw new ValidationException("'name' can't be null", 'name', $this);
		}
		if ($this->getType() === null) {
			throw new ValidationException("'type' can't be null", 'type', $this);
		}
	}
900582
public function validate()
    {
        if ($this->isWorkflowDispatch() && null === $this->getWorkflowRunType()) {
            $errMsg = 'workflowRunType not specified';
            throw new Exception\InvalidMetadataException($errMsg);
        }

        if ($this->isFlagRunPrepareData()) {
            if (null === $this->getPrepareDataMethod()) {
                $errMsg = 'prepareDataMethod not specified';
                throw new Exception\InvalidMetadataException($errMsg);
            }
            if (null === $this->getPrepareDataMethod()) {
                $errMsg = 'prepareDataMethod not specified';
                throw new Exception\InvalidMetadataException($errMsg);
            }
        }

        if ($this->getFlagHasConditions()) {
            if (0 === count($this->getConditions())) {
                $errMsg = 'empty conditions';
                throw new Exception\InvalidMetadataException($errMsg);
            }

            foreach ($this->getConditions() as $condition) {
                $condition->validate();
            }
        }
    }
1030373
private void validateXMLSchema(InputStream objectAsStream, DOValidatorXMLSchema xsv)
            throws ObjectValidityException, GeneralException {

        try {
            xsv.validate(objectAsStream);
        } catch (ObjectValidityException e) {
            logger.error("VALIDATE: ERROR - failed XML Schema validation.", e);
            throw e;
        } catch (Exception e) {
            logger.error("VALIDATE: ERROR - failed XML Schema validation.", e);
            throw new ObjectValidityException("[DOValidatorImpl]: validateXMLSchema. "
                    + e.getMessage());
        }
        logger.debug("VALIDATE: SUCCESS - passed XML Schema validation.");
    }
227561
protected function validateConfig()
    {
        $defaults = [
            'tpl_folder',
            'cache_folder',
            'tpl_file_format',
            //'compress',
            //'event_emitter',
        ];

        foreach ($defaults as $key) {
            if (! isset($this->config[$key])) {
                throw new InvalidConfigException(sprintf("Missing a configuration key (%s)", $key));
            }
        }
    }
729040
protected function validateQueryDefinition()
    {
        if (empty(static::$requestFieldsDefinition))
        {
            throw new RuntimeException('You must configure requestFieldsDefinition property');
        }

        if (empty(static::$signatureDefinition))
        {
            throw new RuntimeException('You must configure signatureDefinition property');
        }

        if (empty(static::$responseFieldsDefinition))
        {
            throw new RuntimeException('You must configure responseFieldsDefinition property');
        }

        if (empty(static::$successResponseType))
        {
            throw new RuntimeException('You must configure allowedResponseTypes property');
        }
    }
305989
@Override
    public void validateDefault(InputProblemReporter rep, boolean normalize)
        throws XMLStreamException
    {
        String defValue = mDefValue.getValue();
        int len = defValue.length();

        // Then code similar to actual value validation:
        StringBuilder sb = null;
        int count = 0;
        int start = 0;

        main_loop:
        while (start < len) {
            char c = defValue.charAt(start);

            // Ok, any white space to skip?
            while (true) {
                if (!WstxInputData.isSpaceChar(c)) {
                    break;
                }
                if (++start >= len) {
                    break main_loop;
                }
                c = defValue.charAt(start);
            }

            int i = start+1;

            do {
                if (++i >= len) {
                    break;
                }
                c = defValue.charAt(i);
            } while (!WstxInputData.isSpaceChar(c));
            ++count;
            String token = defValue.substring(start, i);
            int illegalIx = WstxInputData.findIllegalNmtokenChar(token, mCfgNsAware, mCfgXml11);
            if (illegalIx >= 0) {
                reportValidationProblem(rep, "Invalid default value '"+defValue
                                        +"'; character #"+illegalIx+" ("
                                        +WstxInputData.getCharDesc(defValue.charAt(illegalIx))
                                        +") not a valid NMTOKENS character");
            }

            if (normalize) {
                if (sb == null) {
                    sb = new StringBuilder(i - start + 32);
                } else {
                    sb.append(' ');
                }
                sb.append(token);
            }
            start = i+1;
        }

        if (count == 0) {
            reportValidationProblem(rep, "Invalid default value '"+defValue
                                    +"'; empty String is not a valid NMTOKENS value");
            return;
        }

        if (normalize) {
            mDefValue.setValue(sb.toString());
        }
    }