Validates the config options
@returns {void}
@private
176672
function validateConfig() {
        var metadata = config.metadata;
        config.numPages = metadata.numpages;
        if (!config.pageStart) {
            config.pageStart = 1;
        } else if (config.pageStart < 0) {
            config.pageStart = metadata.numpages + config.pageStart;
        }
        config.pageStart = util.clamp(config.pageStart, 1, metadata.numpages);
        if (!config.pageEnd) {
            config.pageEnd = metadata.numpages;
        } else if (config.pageEnd < 0) {
            config.pageEnd = metadata.numpages + config.pageEnd;
        }
        config.pageEnd = util.clamp(config.pageEnd, config.pageStart, metadata.numpages);
        config.numPages = config.pageEnd - config.pageStart + 1;
    }
797566
function validateConfig (config) {
  var type = typeOf(config);

  if (type.hasValue && !type.isPOJO) {
    throw ono('Invalid arguments. Expected a configuration object.');
  }
}
1290855
function validateConfig(){

    if(!this.config.type){
        throw new Error(resources.errors.missingType);
    }
    if(this.config.type.toLowerCase() !== 'console'){
        throw new Error(resources.errors.incorrectAdapterType);
    }
    if(!this.config.application){
        throw new Error(resources.errors.missingApplication);
    }
    if(!this.config.machine){
        throw new Error(resources.errors.missingMachine);
    }
}
648003
function validate(config, source) {

  if (typeof config.rules === 'object') {
    Object.keys(config.rules).forEach(function(id) {
      validateRuleOptions(id, config.rules[id], source);
    });
  }
}
1321801
function(attrs, options) {
      var error = this.validate(attrs);
      if (error) {
        if (options.error) {
          options.error(this, error, options);
        } else {
          this.trigger('error', this, error, options);
        }
        return false;
      }
      return true;
    }
857476
function validateConfig(config) {
    // appId and versionId are not validated here since
    // not all operations require these to be present.
    // Validation of specific params are done in the
    // ServiceBase.js
    const {subscriptionKey} = config;
    const messageTail = `is missing from the configuration.\n\nDid you run ${chalk.cyan.bold('qnamaker init')} yet?`;
    assert(typeof subscriptionKey === 'string', `The subscriptionKey ${messageTail}`);
}
934128
function validate ( inputOptions ) {

		var i, optionName, optionValue,
			filteredOptions = {};

		for ( i = 0; i < FormatOptions.length; i+=1 ) {

			optionName = FormatOptions[i];
			optionValue = inputOptions[optionName];

			if ( optionValue === undefined ) {

				// Only default if negativeBefore isn't set.
				if ( optionName === 'negative' && !filteredOptions.negativeBefore ) {
					filteredOptions[optionName] = '-';
				// Don't set a default for mark when 'thousand' is set.
				} else if ( optionName === 'mark' && filteredOptions.thousand !== '.' ) {
					filteredOptions[optionName] = '.';
				} else {
					filteredOptions[optionName] = false;
				}

			// Floating points in JS are stable up to 7 decimals.
			} else if ( optionName === 'decimals' ) {
				if ( optionValue >= 0 && optionValue < 8 ) {
					filteredOptions[optionName] = optionValue;
				} else {
					throw new Error(optionName);
				}

			// These options, when provided, must be functions.
			} else if ( optionName === 'encoder' || optionName === 'decoder' || optionName === 'edit' || optionName === 'undo' ) {
				if ( typeof optionValue === 'function' ) {
					filteredOptions[optionName] = optionValue;
				} else {
					throw new Error(optionName);
				}

			// Other options are strings.
			} else {

				if ( typeof optionValue === 'string' ) {
					filteredOptions[optionName] = optionValue;
				} else {
					throw new Error(optionName);
				}
			}
		}

		// Some values can't be extracted from a
		// string if certain combinations are present.
		throwEqualError(filteredOptions, 'mark', 'thousand');
		throwEqualError(filteredOptions, 'prefix', 'negative');
		throwEqualError(filteredOptions, 'prefix', 'negativeBefore');

		return filteredOptions;
	}
1088825
function checkConfig(config) {
  let requiredProps = ['algorithm', 'format'];
  const errMsg = `Configuration isn't an object with the required properties: ${requiredProps.join(', ')}`;

  if ((!config) || (typeof config !== 'object')) {
    throw new Error(errMsg);
  }

  requiredProps.forEach(p => {
    if (!config[p]) {
      throw new Error(errMsg);
    }
  });
}
908632
function FieldValidator(rules, config)
    {
        this.rules      = rules;
        this.fieldLabel = undefined;
        if (config) {
            this.setConfig(config);
        }
    }
761245
function validateGlobals(globalsConfig, source = null) {
    if (!globalsConfig) {
        return;
    }

    Object.entries(globalsConfig)
        .forEach(([configuredGlobal, configuredValue]) => {
            try {
                ConfigOps.normalizeConfigGlobal(configuredValue);
            } catch (err) {
                throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
            }
        });
}
1307028
protected function validateOptionsFields()
    {
        if ($this->submittedValues['optionsAllOn1Line'] == PHP_INT_MAX && $this->submittedValues['optionsAllOnOwnLine'] == 1) {
            $this->errorMessages['optionsAllOnOwnLine'] = $this->t('message_validate_options_0');
        }
        if ($this->submittedValues['optionsAllOn1Line'] > $this->submittedValues['optionsAllOnOwnLine'] && $this->submittedValues['optionsAllOnOwnLine'] > 1) {
            $this->errorMessages['optionsAllOnOwnLine'] = $this->t('message_validate_options_1');
        }

        if (isset($this->submittedValues['optionsMaxLength']) && !ctype_digit($this->submittedValues['optionsMaxLength'])) {
            $this->errorMessages['optionsMaxLength'] = $this->t('message_validate_options_2');
        }
    }
484179
function getValidOptions (options) {
  if (typeof options !== 'object') {
    return DEFAULT_OPTIONS
  }

  var validOptions = {}

  for (var prop in DEFAULT_OPTIONS) {
    if (DEFAULT_OPTIONS.hasOwnProperty(prop)) {
      validOptions[prop] = typeof options[prop] === 'string'
        ? options[prop] : DEFAULT_OPTIONS[prop]
    }
  }

  return validOptions
}
682673
private static function ensureValidConfigOptions($option)
    {
        $class = get_called_class();

        if (!is_array($option)) {
            self::ensureValidConfigOption($class, $option);
        } else {
            $keys = array_keys($option);
            foreach ($keys as $key) {
                self::ensureValidConfigOption($class, $key);
            }
        }
    }
617395
function validateConfig(config) {
  debug('Validating config')

  const deprecatedConfig = {
    gitDir: "lint-staged now automatically resolves '.git' directory.",
    verbose: `Use the command line flag ${chalk.bold('--debug')} instead.`
  }

  const errors = []

  try {
    schema.validateSync(config, { abortEarly: false, strict: true })
  } catch (error) {
    error.errors.forEach(message => errors.push(formatError(message)))
  }

  if (isObject(config.linters)) {
    Object.keys(config.linters).forEach(key => {
      if (
        (!isArray(config.linters[key]) || config.linters[key].some(item => !isString(item))) &&
        !isString(config.linters[key])
      ) {
        errors.push(
          createError(`linters[${key}]`, 'Should be a string or an array of strings', key)
        )
      }
    })
  }

  Object.keys(config)
    .filter(key => !defaultConfig.hasOwnProperty(key))
    .forEach(option => {
      if (deprecatedConfig.hasOwnProperty(option)) {
        logDeprecation(option, deprecatedConfig[option])
        return
      }

      unknownValidationReporter(config, option)
    })

  if (errors.length) {
    throw new Error(errors.join('\n'))
  }

  return config
}
866542
function validateConfig(config){
    let errors = [];

    if( !config.key ){
        errors.push('Missing config \'config.key\' - Undefined Trello Key');
    }
    if( !config.token ){
        errors.push('Missing config \'config.token\' - Undefined Trello Token');
    }
    return errors;
}
552679
def validate_options(valid_option_keys, options)
      options.keys.each do |key|
        unless valid_option_keys.include? key.to_sym
          raise ArgumentError, "Invalid option `#{key}`"
        end
      end
    end
1256133
function validate(options) {
    const schema = joi.object().keys({
        actionName: joi.string().required(),
        authKey: joi.string().required(),
        modelName: joi.string().required(),
        acl: joi.object(),
        aclContextName: joi.string().required()
    });
    const errorMsg = 'Invalid rule options: ';
    const aclContext = options.acl[options.aclContextName];
    joi.assert(options, schema, errorMsg);
    joi.assert(aclContext, joi.func().required(), errorMsg);
    return true;
}