This method validates this segment recursively to ensure the correctness of the configured format.

@param source describes the source of the validation.
193302
public final void validate(StringBuilder source) {

    int length = source.length();
    source.append('/');
    source.append(getSourceIdentifier());
    doValidate(source);
    // reset source for recursive invocation...
    source.setLength(length);
  }
337562
private void validateSingleTableInput(final AnalysisJob job) {
        final SourceColumnFinder sourceColumnFinder = new SourceColumnFinder();
        sourceColumnFinder.addSources(job);
        validateSingleTableInput(sourceColumnFinder, job.getTransformerJobs());
        validateSingleTableInput(sourceColumnFinder, job.getFilterJobs());
        validateSingleTableInput(sourceColumnFinder, job.getAnalyzerJobs());
    }
703624
@Override
    public void validateProcessOutput(FaxClientSpi faxClientSpi,ProcessOutput processOutput,FaxActionType faxActionType)
    {
        //call exit code validation
        super.validateProcessOutput(faxClientSpi,processOutput,faxActionType);

        //get output
        String output=processOutput.getOutputText();

        if((output!=null)&&(output.length()>0))
        {
            //if no valid done output was found
            if(output.indexOf(Fax4jExeConstants.OPERATION_OUTPUT_DONE.toString())==-1)
            {
                //get error message
                String prefix=Fax4jExeConstants.FAX_ERROR_OUTPUT_PREFIX.toString();
                int index=output.indexOf(prefix);
                int prefixLenght=prefix.length();
                String errorMessage=null;
                if(index!=-1)
                {
                    //get index
                    index=index+prefixLenght;

                    if(output.length()>index)
                    {
                        //get output
                        errorMessage=output.substring(index);
                        
                        errorMessage=errorMessage.trim();
                        index=errorMessage.indexOf("\n");
                        if(index!=-1)
                        {
                            errorMessage=errorMessage.substring(0,index);
                            errorMessage=errorMessage.trim();
                        }
                        
                        //ignore empty message
                        if(errorMessage.length()==0)
                        {
                            errorMessage=null;
                        }
                    }
                }
                
                if(errorMessage==null)
                {
                    throw new FaxException("Error while invoking fax4j.exe, no error message detected.\nNative Output:\n"+output);
                }
                throw new FaxException("Error while invoking fax4j.exe, error: "+errorMessage+"\nNative Output:\n"+output);
            }
        }
        else
        {
            throw new FaxException("Error while invoking fax4j.exe, no output detected.");
        }
    }
1291394
public void addSource(ISource source) {
		if (sourceList == null) {
			sourceList = new ArrayList<ISource>();
		}
		sourceList.add(source);
	}
1017025
public void checkHtmlInputSource(InputSource is) throws IOException,
            SAXException {
        validator.reset();
        is.setEncoding("UTF-8");
        checkAsHTML(is);
    }
1043120
public static String sanitize (String source, String charRegex)
    {
        final StringBuilder buf = new StringBuilder(" ");
        final Matcher matcher = Pattern.compile(charRegex).matcher(buf);
        return sanitize(source, new CharacterValidator() {
            public boolean isValid (char c) {
                buf.setCharAt(0, c);
                return matcher.matches();
            }
        });
    }
386410
public void validate(final ValidationContext context) {
        if (!context.getUserEvent().equalsIgnoreCase("submit")) {
            return;
        }

        val messages = context.getMessageContext();
        ApplicationContextProvider.getCasConfigurationProperties().ifPresent(props -> {
            if (StringUtils.isBlank(source) && props.getAuthn().getPolicy().isSourceSelectionEnabled()) {
                messages.addMessage(new MessageBuilder()
                    .error()
                    .source("source")
                    .code("source.required")
                    .build());
            }
        });
    }
1118061
public final void validate() {
    this.accept(new TreeVisitor() {
      @Override
      public boolean preVisit(TreeNode node) {
        node.validateInner();
        return true;
      }
    });
  }
989438
private void validateSingleTableInput(final SourceColumnFinder sourceColumnFinder,
            final Collection<? extends ComponentJob> componentJobs) {
        for (final ComponentJob componentJob : componentJobs) {
            if (!componentJob.getDescriptor().isMultiStreamComponent()) {
                Table originatingTable = null;
                final InputColumn<?>[] input = componentJob.getInput();

                for (final InputColumn<?> inputColumn : input) {
                    final Table table = sourceColumnFinder.findOriginatingTable(inputColumn);
                    if (table != null) {
                        if (originatingTable == null) {
                            originatingTable = table;
                        } else {
                            if (!originatingTable.equals(table)) {
                                throw new IllegalArgumentException(
                                        "Input columns in " + componentJob + " originate from different tables");
                            }
                        }
                    }
                }
            }

            final OutputDataStreamJob[] outputDataStreamJobs = componentJob.getOutputDataStreamJobs();
            for (final OutputDataStreamJob outputDataStreamJob : outputDataStreamJobs) {
                validateSingleTableInput(outputDataStreamJob.getJob());
            }
        }

    }
426733
private void validateResource(List<ValidationMessage> errors, Element resource, Element element, StructureDefinition profile, IdStatus idstatus, NodeStack stack) throws FHIRException, FHIRException {
		assert stack != null;
		assert resource != null;

		// getting going - either we got a profile, or not.
		boolean ok = true;
		if (ok) {
			String resourceName = element.getType();
			if (profile == null) {
				long t = System.nanoTime();
				profile = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + resourceName);
				sdTime = sdTime + (System.nanoTime() - t);
				ok = rule(errors, IssueType.INVALID, element.line(), element.col(), stack.addToLiteralPath(resourceName), profile != null, "No profile found for resource type '" + resourceName + "'");
			} else {
				String type = profile.getKind() == StructureDefinitionKind.LOGICAL ? profile.getId() : profile.hasBaseType() && profile.getDerivation() == TypeDerivationRule.CONSTRAINT ? profile.getBaseType() : profile.getName();
				// special case: we have a bundle, and the profile is not for a bundle. We'll try the first entry instead 
				if (!type.equals(resourceName) && resourceName.equals("Bundle")) {
					Element first = getFirstEntry(element);
					if (first != null && first.getType().equals(type)) {
						element = first;
						resourceName = element.getType();
						idstatus = IdStatus.OPTIONAL; // why?
					}
				}
				ok = rule(errors, IssueType.INVALID, -1, -1, stack.getLiteralPath(), type.equals(resourceName),
						"Specified profile type was '" + type + "', but found type '" + resourceName + "'");
			}
		}

		if (ok) {
			if (idstatus == IdStatus.REQUIRED && (element.getNamedChild("id") == null))
				rule(errors, IssueType.INVALID, element.line(), element.col(), stack.getLiteralPath(), false, "Resource requires an id, but none is present");
			else if (idstatus == IdStatus.PROHIBITED && (element.getNamedChild("id") != null))
				rule(errors, IssueType.INVALID, element.line(), element.col(), stack.getLiteralPath(), false, "Resource has an id, but none is allowed");
			start(errors, resource, element, profile, stack); // root is both definition and type
		}
	}
364896
private void patternSource(PatternDescrBuilder<?> pattern) throws RecognitionException {
        match(input,
                DRL6Lexer.ID,
                DroolsSoftKeywords.FROM,
                null,
                DroolsEditorType.KEYWORD);
        if (state.failed)
            return;

        if (state.backtracking == 0) {
            helper.emit(Location.LOCATION_LHS_FROM);
        }

        if (helper.validateIdentifierKey(DroolsSoftKeywords.ACCUMULATE) || helper.validateIdentifierKey(DroolsSoftKeywords.ACC)) {
            fromAccumulate(pattern);
        } else if (helper.validateIdentifierKey(DroolsSoftKeywords.COLLECT)) {
            fromCollect(pattern);
        } else if (helper.validateIdentifierKey(DroolsSoftKeywords.ENTRY) &&
                helper.validateLT(2,
                        "-") &&
                helper.validateLT(3,
                        DroolsSoftKeywords.POINT)) {
            fromEntryPoint(pattern);
            if (state.failed)
                return;
        } else if (helper.validateIdentifierKey(DroolsSoftKeywords.WINDOW)) {
            fromWindow(pattern);
        } else {
            fromExpression(pattern);
            if (!lastTokenWasWhiteSpace() && input.LA(1) == DRL6Lexer.EOF) {
                helper.emit(Location.LOCATION_LHS_FROM);
                throw new RecognitionException();
            }
            if (state.failed)
                return;
        }
        if (input.LA(1) == DRL6Lexer.SEMICOLON) {
            match(input,
                    DRL6Lexer.SEMICOLON,
                    null,
                    null,
                    DroolsEditorType.SYMBOL);
            if (state.failed)
                return;
        }
    }
15656
@SuppressWarnings("rawtypes")
    @Override
    public void basicValidate(final String section) throws ConfigException {
        ConfigurationUtils.defaultValidate((ConfigurationComponent) this, section);
    }
72520
protected void initBytes(StringBuilder source) {

    if (this.bytes == null) {
      if (this.string != null) {
        String encodingValue = getEncoding();
        try {
          this.bytes = this.string.getBytes(encodingValue);
        } catch (UnsupportedEncodingException e) {
          source.append(".encoding");
          throw new NlsIllegalArgumentException(encodingValue, source.toString(), e);
        }
      } else if (this.hex != null) {
        this.bytes = parseBytes(this.hex, "hex");
      } else {
        throw new XmlInvalidException(
            new NlsParseException(XML_TAG, XML_ATTRIBUTE_HEX + "|" + XML_ATTRIBUTE_STRING, source.toString()));
      }
    }
  }
173521
public static <T, E extends Editor<? super T>> ListValidationEditor<T, E> of( // NOPMD
      final EditorSource<E> source) {
    return new ListValidationEditor<>(source);
  }
449845
protected void ensureNoInvalidFlags(final String actual, 
                                        final char[] invalid) {
        if (actual == null) return;
        StringBuilder unexpected = null;
        for (int i = 0; i < actual.length(); i++) {
            char c = actual.charAt(i);
            if (oneOf(c, invalid)) {
                if (unexpected == null) unexpected = new StringBuilder();
                unexpected.append(c);
            }
        }
        if (unexpected != null) {
            throw FormatException.formatFlagsMismatch(
                    unexpected.toString(), getFormatName());
        }
    }
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 + "'");
        }
    }
201596
@Override
    public void validateDefault(InputProblemReporter rep, boolean normalize)
        throws XMLStreamException
    {
        String def = validateDefaultNmToken(rep, normalize);
        if (normalize) {
            mDefValue.setValue(def);
        }
    }