Check if all required parameters are set
778383
def check_required_params(self):
        
        for param in self.REQUIRED_FIELDS:
            if param not in self.params:
                raise ValidationError("Missing parameter: {}".format(param))
913983
def _check_params(self,params):
        
        overridden_object_params = list(self._overridden.param)
        for item in params:
            if item not in overridden_object_params:
                self.param.warning("'%s' will be ignored (not a Parameter).",item)
213376
def configuration_is_valid?(configuration)
      required_parameters = ['file_name', 'standard_stream']
      required_parameters.each { |parameter| return false unless configuration.include?(parameter) }
      return false if configuration['file_name'].empty?
      return false unless ['stdout', 'stderr', 'none'].include?(configuration['standard_stream'])
      return true
    end
532486
def check_valid(self):
		
		for k,input in self.inputs.items():
			if k in self.valid_opts:
				for param in self.valid_opts[k]:
					if param is None or input is None:
						return True
					elif type(param) is str and '+' in param:
						if re.search(r'^'+param,str(input)):
							return True
					elif type(param) is bool and type(input) is bool:
						return True
					elif type(param) is list and type(input) is list:
						return True
					else:
						if str(input).lower() == str(param):
							return True
				raise ValueError("Invalid input for '%s' parameter. Options are: %s" % (k,' '.join(["'%s'," % str(o) for o in self.valid_opts[k]]) ))
			else:
				raise ValueError("Invalid parameter for '%s'. Params are: %s" % (self.__class__.__name__,', '.join(["'%s'" % p for p in self.valid_opts.keys()]) ))
1342514
def validate(self):
        
        errors = []
        for param in self.required_params:
            if (not hasattr(self, param) or getattr(self, param) is None):
                errors.append("missing %s parameter" % (param))
        if (len(errors) > 0):
            raise IIIFInfoError("Bad data for info.json: " + ", ".join(errors))
        return True
908200
def check_required(self):
        
        die = False
        for key, value in self.spec.items():
            if not getattr(self, key.upper()) and value['required']:
                print(f"{key} is a required setting. "
                      "Set via command-line params, env or file. "
                      "For examples, try '--generate' or '--help'.")
                die = True
        if die:
            sys.exit(1)
810644
static function checkAnyRequiredParameter(array $given, array $required)
    {
        try {
            
            foreach ($required as $key) {
                if (!empty($given[$key])) {
                    throw new RequiredParameterFound();
                }
            }
            
            $parameters = implode(', ', $required);
            throw new MissingRequiredParameterException(
                    "At least one parameter required: $parameters"
            );
            
        } catch (RequiredParameterFound $ex) {
            // we have one required parameter, thats all we need
        }
    }
896184
def _missing_required_parameters(rqset, **kwargs):
    
    key_set = set(list(iterkeys(kwargs)))
    required_minus_received = rqset - key_set
    if required_minus_received != set():
        return list(required_minus_received)
175142
@Override
    protected void checkParameters() {
        super.checkParameters();

        if (inputFile == null) {
            throw new BuildException("inputFile element is required");
        }

        checkBoolean(formatDates, "formatDates");
        checkBoolean(noTabs, "noTabs");
        checkBoolean(summary, "summary");
    }
870948
def _checkMissingParams(self, template, **kwargs):
        

        parameters = self.listFields(template)
        self._findMissingParams(parameters, **kwargs)
1358530
def check_requirements(dist, attr, value):
    """"""
    try:
        list(pkg_resources.parse_requirements(value))
    except (TypeError,ValueError):
        raise DistutilsSetupError(
            "%r must be a string or list of strings "
            "containing valid project/version requirement specifiers" % (attr,)
        )
1206216
@Override
    protected void checkParameters() {
        super.checkParameters();

        if (outputFile == null) {
            throw new BuildException("output attribute is required", getLocation());
        }

        if (inputFile == null) {
            throw new BuildException("inputFile element is required");
        }

        checkBoolean(notAProblem, "notAProblem");
        checkBoolean(withSource, "withSource");
        checkBoolean(applySuppression, "applySuppression");
        checkBoolean(active, "active");
        checkBoolean(introducedByChange, "introducedByChange");
        checkBoolean(removedByChange, "removedByChange");
        checkBoolean(newCode, "newCode");
        checkBoolean(removedCode, "removedCode");
        checkBoolean(withMessages, "withMessages");
    }
1123274
def check_arguments(self):
        
        for k, v in self.Parameters.iteritems():
            if self.Parameters[k].isOn():
                if k in self._valid_arguments:
                    if not self._valid_arguments[k](v.Value):
                        error_message = 'Invalid argument (%s) ' % v.Value
                        error_message += 'for parameter %s\n' % k
                        raise InvalidArgumentApplicationError(error_message)
871748
private boolean validateParameters() {

        boolean allOk = true;

        StringBuffer validationErrors = new StringBuffer(32);
        CmsMessages messages = Messages.get().getBundle(getLocale());

        // check resource parameter presence
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamResource()) || !getCms().existsResource(getParamResource())) {
            allOk = false;
            validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_VFS_RESOURCE_0)).append("<br>");
        }

        // check selected property name
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamPropertyName())) {
            allOk = false;
            validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_SELECT_PROPERTY_0)).append("<br>");
        }

        // check old property value to look up
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamOldValue())) {
            allOk = false;
            validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_OLD_PROP_VALUE_0)).append("<br>");
        } else {
            try {
                // check if there is a place holder in the expression pattern
                // remove it here, because otherwise this is no valid expression pattern
                String oldValue = getParamOldValue();
                if (oldValue.contains(CmsStringUtil.PLACEHOLDER_START)
                    && oldValue.contains(CmsStringUtil.PLACEHOLDER_END)) {
                    oldValue = oldValue.replace(CmsStringUtil.PLACEHOLDER_START, "");
                    oldValue = oldValue.replace(CmsStringUtil.PLACEHOLDER_END, "");
                }
                // compile regular expression pattern
                Pattern.compile(oldValue);
            } catch (PatternSyntaxException e) {
                allOk = false;
                validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_OLD_PROP_PATTERN_0)).append(
                    "<br>");
            }
        }

        // check new property value
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamNewValue())) {
            // if no new value was given, set it to the delete value
            setParamNewValue(CmsProperty.DELETE_VALUE);
        }

        setErrorMessage(validationErrors.toString());
        setValidationErrors(!allOk);
        return allOk;
    }
468531
function(methodDef, callback, params, payload) {
        // check required params
        for (var index in methodDef.required_params) {
            var requiredParamName = methodDef.required_params[index];
            if (!params.hasOwnProperty(requiredParamName)) {
                callback(requiredParamName +' param is required');
                return false;
            }
        }
        // check unattended params
        if (methodDef.unattended_params === false) {
            for (var param in params) {
                if (methodDef.optional_params.indexOf(param) == -1
                    && methodDef.required_params.indexOf(param) == -1) {
                    callback('unattended param '+ param);
                    return false;
                }
            }
        }
        // TODO: optional_payload is also on spore specification
        if (!payload && methodDef.required_payload === true) {
            callback("payload is required");
            return false;
        }
        return true;
    }
456962
@Override
    protected void checkParameters() {
        super.checkParameters();

        if (outputFile == null) {
            throw new BuildException("output attribute is required", getLocation());
        }

        if (inputFile == null) {
            throw new BuildException("inputFile element is required");
        }

        checkBoolean(withMessages, "withMessages");
        checkBoolean(resetSource, "resetSource");
    }
237287
def _check_create_parameters(self, **kwargs):
        
        rset = self._meta_data['required_creation_parameters']
        check = _missing_required_parameters(rset, **kwargs)
        if check:
            error_message = 'Missing required params: %s' % check
            raise MissingRequiredCreationParameter(error_message)