Creates a {@link ArgumentValidator} which checks for _#arguments >= expectedMin_

@param expectedMin the minimum number of expected arguments
@return the MissingArgumentsValidator
763184
public static ArgumentValidator atLeast(final int expectedMin) {
        switch (expectedMin) {
            case 0:
                return ZERO_OR_MORE;
            case 1:
                return ONE_OR_MORE;
            case 2:
                return TWO_OR_MORE;
        }
        return atLeast(expectedMin, MessageFormat.format("{0}..*", expectedMin));
    }
15031
def _ensure_arguments_are_provided(expected_types, arguments):
    """"""
    # This function only checks that the arguments were specified,
    # and does not check types. Type checking is done as part of the actual formatting step.
    expected_arg_names = set(six.iterkeys(expected_types))
    provided_arg_names = set(six.iterkeys(arguments))

    if expected_arg_names != provided_arg_names:
        missing_args = expected_arg_names - provided_arg_names
        unexpected_args = provided_arg_names - expected_arg_names
        raise GraphQLInvalidArgumentError(u'Missing or unexpected arguments found: '
                                          u'missing {}, unexpected '
                                          u'{}'.format(missing_args, unexpected_args))
1304636
private String getArgRequiredErrorMessage() {
        return getMutexTargetList().isEmpty() ?
                String.format("Argument '%s' is required", getLongName()) :
                String.format("Argument '%s' is required unless one of {%s} are provided", getLongName(), getMutexTargetList());
    }
1032333
public static<E, T extends ParamValidator<E>> T getValidator(Class<T> clazz, Param<Boolean> param) {

        // get if such validator was already initialized
        List<ParamValidator> validators = validatorsMap.get(clazz);
        if (validators == null) {
            addValidators(validatorsMap, clazz, null, null);
        }

        // start searching from index 2 - from this index and on, the list preserves <ParamValidatorWrapper> specific instances
        for (int i=2; i<validators.size(); i++) {
            ParamValidator validator = validators.get(i);

            if (validator.getClass() == ParamValidatorWrapper.class &&
                ((ParamValidatorWrapper)validator).ifParam == param) {

                return (T)validator;
            }

        }

        T validator = (T)new ParamValidatorWrapper<E>(clazz, param);
        validators.add(validator);

        return validator;
    }
838999
public static Validator getExperimentalValidator() {
        return CascadingValidator.create(
                ParenthesesValidator.INSTANCE,
                ConfigurableValidator.create(ValidatorConfiguration.createExperimental()));
    }
1249406
def _make_args_checker(self):
        
        def _checker(*args, **kws):
            # Check if too many arguments are provided
            nargs = len(args)
            nnonvaargs = min(nargs, self._max_positional_args)
            if nargs > self._max_positional_args and self._ivararg is None:
                raise self._too_many_args_error(nargs)

            # Check if there are too few positional arguments (without defaults)
            if nargs < self._min_positional_args:
                missing = [p.name
                           for p in self.params[nargs:self._min_positional_args]
                           if p.name not in kws]
                # The "missing" arguments may still be provided as keywords, in
                # which case it's not an error at all.
                if missing:
                    raise self._too_few_args_error(missing, "positional")

            # Check if there are too few required keyword arguments
            if self._required_kwonly_args:
                missing = [kw
                           for kw in self._required_kwonly_args
                           if kw not in kws]
                if missing:
                    raise self._too_few_args_error(missing, "keyword")

            # Check types of positional arguments
            for i, argvalue in enumerate(args):
                param = self.params[i if i < self._max_positional_args else
                                    self._ivararg]
                if param.checker and not (
                    param.checker.check(argvalue) or
                    param.has_default and
                        (argvalue is param.default or argvalue == param.default)
                ):
                    raise self._param_type_error(param, param.name, argvalue)

            # Check types of keyword arguments
            for argname, argvalue in kws.items():
                argindex = self._iargs.get(argname)
                if argindex is not None and argindex < nnonvaargs:
                    raise self._repeating_arg_error(argname)
                index = self._iargs.get(argname)
                if index is None:
                    index = self._ivarkws
                if index is None:
                    s = "%s got an unexpected keyword argument `%s`" % \
                        (self.name_bt, argname)
                    raise self._type_error(s)
                param = self.params[index]
                if param.checker and not (
                    param.checker.check(argvalue) or
                    param.has_default and
                        (argvalue is param.default or argvalue == param.default)
                ):
                    raise self._param_type_error(param, argname, argvalue)

        return _checker
1194830
public CmsMessageContainer validateWithMessage() {

        if (m_parsingFailed) {
            return Messages.get().container(Messages.ERR_SERIALDATE_INVALID_VALUE_0);
        }
        if (!isStartSet()) {
            return Messages.get().container(Messages.ERR_SERIALDATE_START_MISSING_0);
        }
        if (!isEndValid()) {
            return Messages.get().container(Messages.ERR_SERIALDATE_END_BEFORE_START_0);
        }
        String key = validatePattern();
        if (null != key) {
            return Messages.get().container(key);
        }
        key = validateDuration();
        if (null != key) {
            return Messages.get().container(key);
        }
        if (hasTooManyEvents()) {
            return Messages.get().container(
                Messages.ERR_SERIALDATE_TOO_MANY_EVENTS_1,
                Integer.valueOf(CmsSerialDateUtil.getMaxEvents()));
        }
        return null;
    }
30373
private Validator createDefaultValidator() {
        final ValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory();
        final Validator validator = validatorFactory.usingContext()
                .getValidator();
        
        return validator;
    }
650813
private void validateArguments() throws BuildException {
    Path tempDir = getTempDir();

    if (tempDir == null) {
      throw new BuildException("Temporary directory cannot be null.");
    }
    
    if (Files.exists(tempDir)) {
      if (!Files.isDirectory(tempDir)) {
        throw new BuildException("Temporary directory is not a folder: " + tempDir.toAbsolutePath());
      }
    } else {
      try {
        Files.createDirectories(tempDir);
      } catch (IOException e) {
        throw new BuildException("Failed to create temporary folder: " + tempDir, e);
      }
    }
  }
551736
private void validateArgumentValues()  {
        namedArgumentDefinitions = validatePluginArgumentValues(); // trim the list of plugin-derived argument definitions before validation
        for (final NamedArgumentDefinition argumentDefinition : namedArgumentDefinitions) {
            argumentDefinition.validateValues(this);
        }
        if (positionalArgumentDefinition != null) {
            positionalArgumentDefinition.validateValues(this);
        }
    }
517449
protected function validateRequiredParameters(array $required, array $params)
    {
        foreach ($required as $param) {
            if (!isset($params[$param])) {
                throw new MissingArgumentException(sprintf('The "%s" parameter is required.', $param));
            }
        }
    }
922460
public void checkExpectedValidationViolations(
			Set<ConstraintViolation<T>> violations,
			List<String> expectedValidationViolations) {

		if (violations != null && expectedValidationViolations != null) {

			List<String> givenViolations = new ArrayList<String>();
			for (ConstraintViolation<T> violation : violations) {
				givenViolations.add(violation.getMessageTemplate());
			}

			checkViolations(givenViolations, expectedValidationViolations);
		}

	}
747345
public static boolean validateIntegerParam(final Map<String, String> params,
      final String paramName) throws ExecutorManagerException {
    if (params != null && params.containsKey(paramName)
        && !StringUtils.isNumeric(params.get(paramName))) {
      throw new ExecutorManagerException(paramName + " should be an integer");
    }
    return true;
  }
209153
public static <T extends CharSequence> T checkArgNotNullOrEmpty(final T arg, final String argNameOrErrorMsg) {
        if (N.isNullOrEmpty(arg)) {
            if (argNameOrErrorMsg.indexOf(' ') == N.INDEX_NOT_FOUND) {
                throw new IllegalArgumentException("'" + argNameOrErrorMsg + "' can not be null or empty");
            } else {
                throw new IllegalArgumentException(argNameOrErrorMsg);
            }
        }

        return arg;
    }
493015
public static Builder addValuesToAnnotationArgument(
      AnnotationTree annotation,
      String parameterName,
      Collection<String> newValues,
      VisitorState state) {
    if (annotation.getArguments().isEmpty()) {
      String parameterPrefix = parameterName.equals("value") ? "" : (parameterName + " = ");
      return SuggestedFix.builder()
          .replace(
              annotation,
              annotation
                  .toString()
                  .replaceFirst("\\(\\)", "(" + parameterPrefix + newArgument(newValues) + ")"));
    }
    Optional<ExpressionTree> maybeExistingArgument = findArgument(annotation, parameterName);
    if (!maybeExistingArgument.isPresent()) {
      return SuggestedFix.builder()
          .prefixWith(
              annotation.getArguments().get(0),
              parameterName + " = " + newArgument(newValues) + ", ");
    }

    ExpressionTree existingArgument = maybeExistingArgument.get();
    if (!existingArgument.getKind().equals(NEW_ARRAY)) {
      return SuggestedFix.builder()
          .replace(
              existingArgument, newArgument(state.getSourceForNode(existingArgument), newValues));
    }

    NewArrayTree newArray = (NewArrayTree) existingArgument;
    if (newArray.getInitializers().isEmpty()) {
      return SuggestedFix.builder().replace(newArray, newArgument(newValues));
    } else {
      return SuggestedFix.builder()
          .postfixWith(getLast(newArray.getInitializers()), ", " + Joiner.on(", ").join(newValues));
    }
  }
845186
public static String checkNotEmpty(String arg, @Nullable Object errorMessage) {
    boolean empty = Strings.isNullOrEmpty(arg) || CharMatcher.whitespace().matchesAllOf(arg);
    checkArgument(!empty, errorMessage);
    return arg;
  }
487924
public void addValidator(com.andreabaccega.formedittextvalidator.Validator theValidator) throws IllegalArgumentException {
        editTextValidator.addValidator(theValidator);
    }