Builds the validator.

@return Fully constructed validator.
503971
private GeneralValidator<DPO, RI, RO, RHI> build() {
        // Create validator
        GeneralValidator<DPO, RI, RO, RHI> validator = new GeneralValidator<DPO, RI, RO, RHI>();

        // Add triggers
        for (Trigger trigger : addedTriggers) {
            validator.addTrigger(trigger);
        }

        // Add data providers
        for (DataProvider<DPO> dataProvider : addedDataProviders) {
            validator.addDataProvider(dataProvider);
        }

        // Map data providers output to rules input
        validator.setDataProviderToRuleMappingStrategy(dataProviderToRuleMapping);
        validator.setRuleInputTransformers(addedRuleInputTransformers);

        // Add rules
        for (Rule<RI, RO> rule : addedRules) {
            validator.addRule(rule);
        }

        // Map rules output to result handlers input
        validator.setRuleToResultHandlerMappingStrategy(ruleToResultHandlerMapping);
        validator.setResultHandlerInputTransformers(addedResultHandlerInputTransformers);

        // Add result handlers
        for (ResultHandler<RHI> resultHandler : addedResultHandlers) {
            validator.addResultHandler(resultHandler);
        }

        return validator;
    }
6728
public function validateData()
    {
        $constraint = new Assert\Collection([
            'fields' => $this->getValidationRules(),
        ]);

        $violations = $this->validator->validate($this->getParameters(), $constraint);
        if ($violations->count()) {
            throw new ValidatorException($violations);
        }

        return $this;
    }
545014
static ValidatorFactory createValidatorFactory()
   {
      Configuration configuration = Validation.byDefaultProvider().configure();
      Configuration<?> conf = configuration.traversableResolver(new IronJacamarTraversableResolver());

      return conf.buildValidatorFactory();
   }
176218
protected function getValidatorInstance(): Validator
    {
        $factory = $this->container->make(ValidationFactory::class);

        if (method_exists($this, 'validator')) {
            $validator = $this->container->call([$this, 'validator'], compact('factory'));
        } else {
            $validator = $this->createDefaultValidator($factory);
        }

        if (method_exists($this, 'withValidator')) {
            $this->withValidator($validator);
        }

        return $validator;
    }
598409
public FacesConfigValidatorType<FacesConfigType<T>> getOrCreateValidator()
   {
      List<Node> nodeList = childNode.get("validator");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigValidatorTypeImpl<FacesConfigType<T>>(this, "validator", childNode, nodeList.get(0));
      }
      return createValidator();
   }
765795
public function getValidator(): Validator
    {
        if ($this->validator === null) {
            $this->validator = new Validator(new ValidatorCollection(), $this->getPlaceholder());
        }

        return $this->validator;
    }
45559
public static function validateClass() {
		$moufManager = MoufManager::getMoufManager();
		
		try {
            $moufManager->checkConstructorLoop();
			return new MoufValidatorResult(MoufValidatorResult::SUCCESS, "No loop detected in constructor arguments.");
		}
		catch(MoufException $e) {
			return new MoufValidatorResult(MoufValidatorResult::ERROR, '<b>'.$e->getMessage().'</b><br /><br />
			                 Please check yours instances to refactor your code and change your code architecture.<br />
			                 The other ugly solution is to make a setter for one of this parameter to remove it from constructor argument');
		}
	}
1183472
function build(validatorName, validatorOptions) {

    if (typeof validatorBuildersRepository[validatorName] !== 'function') {
        throw validatorName + ' does not exists. use addValidatorBuilder to add a new validation rule';
    }

    return validatorBuildersRepository[validatorName](ValidationState, stateEnum, validatorOptions);
}
898954
private Validator<ValueType> validateLeft() {
        Validator<ValueType> result = null;
        Collection<Validator<ValueType>> subValidators = onGetLeftErrorMessage();

        if (subValidators != null) {
            for (Validator<ValueType> validator : subValidators) {
                notifyOnValidationFailure(validator);

                if (result == null) {
                    result = validator;
                }
            }
        }

        for (Validator<ValueType> validator : validators) {
            if (!validator.validate(getValue())) {
                notifyOnValidationFailure(validator);

                if (result == null) {
                    result = validator;
                }
            }
        }

        return result;
    }
105787
public function validators()
    {
        if (is_null($this->validatorRequests)) {
            $this->validatorRequests = new ValidatorRequests($this->client);
        }

        return $this->validatorRequests;
    }
125690
protected function buildFields()
    {
        $messages = (isset($this->validator)) ? $this->validator->messages() : false;

        foreach ($this->fields as $field) {
            $field->status = $this->status;
            $field->orientation = $this->orientation;
            $field->has_label = $this->has_labels;
            $field->has_placeholder = $this->has_placeholders;
            if ($messages and $messages->has($field->name)) {
                $field->messages = $messages->get($field->name);
                $field->has_error = " has-error";
            }
            $field->build();
        }
    }
1151518
public Retryer<V> build() {
        AttemptTimeLimiter<V> theAttemptTimeLimiter = attemptTimeLimiter == null ? AttemptTimeLimiters.<V>noTimeLimit() : attemptTimeLimiter;
        StopStrategy theStopStrategy = stopStrategy == null ? StopStrategies.neverStop() : stopStrategy;
        WaitStrategy theWaitStrategy = waitStrategy == null ? WaitStrategies.noWait() : waitStrategy;
        BlockStrategy theBlockStrategy = blockStrategy == null ? BlockStrategies.threadSleepStrategy() : blockStrategy;

        return new Retryer<V>(theAttemptTimeLimiter, theStopStrategy, theWaitStrategy, theBlockStrategy, rejectionPredicate, listeners);
    }
501389
protected function getValidatorInstance()
    {
        $this->setupValidationScenario();
        $this->setupValidationParameters();

        $this->validationFactory = $this->container->make(ValidationContract::class);
        $this->validationDispatcher = $this->container->make(DispatcherContract::class);

        return $this->runValidation($this->all(), [], $this->messages());
    }
1032604
private Validator createNewErrorValidator() {
        final Validator validator = schema.newValidator();
        validator.setErrorHandler(new Handler());
        return validator;
    }
48460
public function buildFormFactory()
    {
        $this->ensureCsrfTokenManagerAndTranslatorExist();
        $validator = $this->buildValidator();
        $csrf      = new CsrfExtension(
            $this->csrf_token_manager,
            $this->translator,
            TranslatorBuilder::TRANSLATION_DOMAIN
        );
        $builder   = Forms::createFormFactoryBuilder()->addExtension($csrf)
                                            ->addExtension(new ValidatorExtension($validator))
                                            ->addExtension(new HttpFoundationExtension());
        foreach ($this->form_extensions as $extension) {
            $builder->addExtension($extension);
        }
        return $builder->getFormFactory();
    }
486224
public function build()
    {
        $this->checkName();
        $this->checkCallable();
        $this->checkOrderable();
        $this->checkSearchable();

        return new ColumnConfiguration($this->name, $this->callable, $this->searchable, $this->orderable);
    }
396838
@Nonnull
	public final LCharSupplier build() {

		final LCharSupplier eventuallyFinal = this.eventually;

		LCharSupplier retval;

		final Case<LBoolSupplier, LCharSupplier>[] casesArray = cases.toArray(new Case[cases.size()]);
		retval = LCharSupplier.charSup(() -> {
			try {
				for (Case<LBoolSupplier, LCharSupplier> aCase : casesArray) {
					if (aCase.casePredicate().getAsBool()) {
						return aCase.caseFunction().getAsChar();
					}
				}

				return eventuallyFinal.getAsChar();
			} catch (Error e) { // NOSONAR
					throw e;
				} catch (Throwable e) { // NOSONAR
					throw Handler.handleOrPropagate(e, handling);
				}
			});

		if (consumer != null) {
			consumer.accept(retval);
		}
		return retval;
	}