Validate
@param vo The validate object
@param rb The resource bundle
@return The list of failures found; <code>null</code> if none
187439
@SuppressWarnings("unchecked")
   public List<Failure> validate(Validate vo, ResourceBundle rb)
   {
      if (vo != null && Key.MANAGED_CONNECTION == vo.getKey())
      {
         if (!ManagedConnection.class.isAssignableFrom(vo.getClazz()))
         {
            List<Failure> failures = new ArrayList<Failure>(1);

            Failure failure = new Failure(Severity.ERROR,
                                          SECTION,
                                          rb.getString("mc.MC"),
                                          vo.getClazz().getName());
            failures.add(failure);

            return failures;
         }
      }

      return null;
   }
725474
public <T> FluentValidator onEach(T[] t, final Validator<T> v) {
        Preconditions.checkNotNull(v, "Validator should not be NULL");
        if (ArrayUtil.isEmpty(t)) {
            lastAddCount = 0;
            return this;
        }

        return onEach(Arrays.asList(t), v);
    }
834993
public VM validate(Iterator<Split> dataSplits, TrainingParameters trainingParameters) {
        AbstractModeler modeler = MLBuilder.create(trainingParameters, configuration);

        List<VM> validationMetricsList = new LinkedList<>();
        while (dataSplits.hasNext()) {
            Split s = dataSplits.next();
            Dataframe trainData = s.getTrain();
            Dataframe testData = s.getTest();

            modeler.fit(trainData);
            trainData.close();

            modeler.predict(testData);
            VM entrySample = ValidationMetrics.newInstance(vmClass, testData);
            testData.close();

            validationMetricsList.add(entrySample);
        }
        modeler.close();

        VM avgValidationMetrics = ValidationMetrics.newInstance(vmClass, validationMetricsList);

        return avgValidationMetrics;
    }
683670
function validateContainer (container) {
  if (!container) {
    return Boom.create(504, 'instance has no container');
  }
  if (container.error) {
    return Boom.create(504, 'instance container has error', container.error);
  }
  if (container.inspect.error) {
    return Boom.create(503, 'instance inspect failed (try again)', container.inspect.error);
  }
  return null;
}
788973
public List<ValidationResult> validate(Object value) {
		List<ValidationResult> results = new ArrayList<ValidationResult>();
		performValidation("", value, results);
		return results;
	}
891526
public static boolean validateResource(URI uri) {
        return uri != null && uri.getPort() != -1 && uri.getHost() != null;
    }
293102
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString id_validator = new MPSString();
		id_validator.validate(operationType, id, "\"id\"");
		
		MPSBoolean secure_access_only_validator = new MPSBoolean();
		secure_access_only_validator.validate(operationType, secure_access_only, "\"secure_access_only\"");
		
		MPSString svm_ns_comm_validator = new MPSString();
		svm_ns_comm_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 10);
		svm_ns_comm_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		svm_ns_comm_validator.validate(operationType, svm_ns_comm, "\"svm_ns_comm\"");
		
		MPSString ns_br_interface_validator = new MPSString();
		ns_br_interface_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 10);
		ns_br_interface_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		ns_br_interface_validator.validate(operationType, ns_br_interface, "\"ns_br_interface\"");
		
		MPSBoolean vm_auto_poweron_validator = new MPSBoolean();
		vm_auto_poweron_validator.validate(operationType, vm_auto_poweron, "\"vm_auto_poweron\"");
		
		MPSString ns_br_interface_2_validator = new MPSString();
		ns_br_interface_2_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 10);
		ns_br_interface_2_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		ns_br_interface_2_validator.validate(operationType, ns_br_interface_2, "\"ns_br_interface_2\"");
		
		MPSInt init_status_validator = new MPSInt();
		init_status_validator.validate(operationType, init_status, "\"init_status\"");
		
	}
311291
public static <T extends MPBase> boolean validate(T objectToValidate) throws MPValidationException {
        Collection<ValidationViolation> colViolations = validate(new Vector<ValidationViolation>(), objectToValidate);
        if (!colViolations.isEmpty()) {
            throw new MPValidationException(colViolations);
        }
        return true;
    }
426777
public java.util.List<ValidationError> getValidationErrors() {
        if (validationErrors == null) {
            validationErrors = new com.amazonaws.internal.SdkInternalList<ValidationError>();
        }
        return validationErrors;
    }
1326718
public static boolean isValid(Resource resource) {
        return resource instanceof ResourceHandle
                ? ((ResourceHandle) resource).isValid()
                : resource != null && resource.getResourceResolver().getResource(resource.getPath()) != null;
    }
7757
@Override
	public boolean validate(final Problems problems, final String compName, final String model) {
		final char[] c = model.toCharArray();
		boolean result = true;
		String curr;
		for (final char element : c) {
			curr = new String(new char[] { element });
			try {
				final String nue = new String(curr.getBytes(this.charsetName));
				result = element == nue.charAt(0);
				if (!result) {
					problems.add(
							ValidationBundle.getMessage(EncodableInCharsetValidator.class, "INVALID_CHARACTER", compName, curr, this.charsetName)); // NOI18N
					break;
				}
			} catch (final UnsupportedEncodingException ex) {
				// Already tested in constructor
				throw new AssertionError(ex);
			}
		}
		return result;
	}
997930
public static<T extends ParamValidator> T getValidator(Class<T> clazz, boolean required) {

        List<ParamValidator> validators = validatorsMap.get(clazz);
        if (validators != null) {

            if (required) {
                return (T)validators.get(0);
            }

            return (T)validators.get(1);
        }

        return null;
    }
859978
def getter_fail(error)
      message = "#{self.class.to_s} Error: #{error.inspect}"

      if RUBY_PLATFORM == 'opal'
        if `#{@getter}`
          message += "\n" + `#{@getter}.toString()`
        end
      else
        if error.respond_to?(:backtrace)
          message += "\n" + error.backtrace.join("\n")
        end
      end

      Volt.logger.error(message)
    end
7924
def valid?
      return false if @status.nil?
      status_validator = EnumAttributeValidator.new('String', ['error'])
      return false unless status_validator.valid?(@status)
      return false if @errors.nil?
      true
    end
1102770
private static List<Validate> createResourceAdapter(Connector cmd,
         List<Failure> failures, ResourceBundle rb, ClassLoader cl)
   {
      List<Validate> result = new ArrayList<Validate>();

      if (cmd.getVersion() != Version.V_10 && cmd.getResourceadapter() != null &&
          cmd.getResourceadapter().getResourceadapterClass() != null)
      {
         try
         {
            Class<?> clazz = Class.forName(cmd.getResourceadapter().getResourceadapterClass(),
                                           true, cl);
            List<ConfigProperty> configProperties = cmd.getResourceadapter().getConfigProperties();

            ValidateClass vc = new ValidateClass(Key.RESOURCE_ADAPTER, clazz, configProperties);
            result.add(vc);
         }
         catch (ClassNotFoundException e)
         {
            Failure failure = new Failure(Severity.ERROR,
                                          rb.getString("uncategorized"),
                                          rb.getString("ra.cnfe"),
                                          e.getMessage());
            failures.add(failure);
         }
      }
      return result;
   }
773153
private static ValidationMessage[] vmFromVector(Vector v) {
        ValidationMessage[] vm = new ValidationMessage[v.size()];
        for (int i = 0; i < vm.length; i++) {
            vm[i] = (ValidationMessage) v.get(i);
        }
        return vm;
    }
254087
public AppValidator failsWith(String expectedFailure) {
        stringsToFind.add(expectedFailure);
        stringsToFind.add(APP_FAIL_CODE);
        server.addIgnoredErrors(Collections.singletonList(expectedFailure));
        return this;
    }