Sets explicit header validator for this receive action.
@param validators
@return
165817
public T headerValidator(HeaderValidator... validators) {
        Stream.of(validators).forEach(headerValidationContext::addHeaderValidator);
        return self;
    }
405972
public T headers(Map<String, Object> headers) {
        getMessageContentBuilder().getMessageHeaders().putAll(headers);
        return self;
    }
1361714
private void notifyOnValidationFailure(@NonNull final Validator<CharSequence> validator) {
        for (ValidationListener<CharSequence> validationListener : validationListeners) {
            validationListener.onValidationFailure(this, validator);
        }
    }
300911
public TrailingHeaders setHeader(CharSequence name, Iterable<Object> values) {
        lastHttpContent.trailingHeaders().set(name, values);
        return this;
    }
1092642
public function addValidator(Validator $validator) : ValidationCheckerInterface
    {
        $this->validated = false;
        $validator->setValidationSet($this);
        array_push($this->validators, $validator);
        return $this;
    }
851646
public T responseTrailersSanitizer(
            Function<? super HttpHeaders, ? extends HttpHeaders> responseTrailersSanitizer) {
        this.responseTrailersSanitizer = requireNonNull(responseTrailersSanitizer, "responseTrailersSanitizer");
        return self();
    }
624373
public HttpFileServiceBuilder setHeaders(Headers<AsciiString, String, ?> headers) {
        requireNonNull(headers, "headers");
        if (!headers.isEmpty()) {
            getOrCreateHeaders().setAll(headers);
        }
        return this;
    }
93832
def generate_header_validator(headers, context, **kwargs):
    
    validators = ValidationDict()
    for header_definition in headers:
        header_processor = generate_value_processor(
            context=context,
            **header_definition
        )
        header_validator = generate_object_validator(
            field_validators=construct_header_validators(header_definition, context=context),
        )
        validators.add_property_validator(
            header_definition['name'],
            chain_reduce_partial(
                header_processor,
                header_validator,
            ),
        )
    return generate_object_validator(field_validators=validators)
848714
public Validator[] getValidators()
    {
        return _validatorList == null ? EMPTY_VALIDATOR_ARRAY
                : _validatorList.toArray(new Validator[_validatorList.size()]);
    }
580017
public void addValidator(final FieldValidator validator) {
		WComponent labelField = findComponentForLabel(field);

		if (labelField instanceof Input) {
			((Input) labelField).addValidator(validator);
		}
	}
417083
protected function fillObjectValidators($definitions, $validators)
    {
        foreach ($definitions as $class => $definition) {
            foreach ($definition->validators['properties'] as $property => $validatorsDefinitions) {
                foreach ($validatorsDefinitions as $validatorDefinition) {
                    if ($validatorDefinition instanceof ObjectReferenceDefinition) {
                        $validator = $validators[$class];
                        $propertyValidators = $validator->getValidators();
                        $propertyValidators[$property] = $validators[$validatorDefinition->class];
                        $validator->setValidators($propertyValidators);
                    }
                }
            }
        }

        return $validators;
    }
279037
@SuppressWarnings("unchecked")
    public T headerValidator(String ... validatorNames) {
        Assert.notNull(applicationContext, "Citrus application context is not initialized!");

        for (String validatorName : validatorNames) {
            headerValidationContext.addHeaderValidator(applicationContext.getBean(validatorName, HeaderValidator.class));
        }

        return self;
    }
831324
public OkRequest<T> headers(final Map<String, String> headers) {
        if (!headers.isEmpty())
            for (Map.Entry<String, String> header : headers.entrySet())
                header(header);
        return this;
    }
1284931
@SafeVarargs
    public final void setValidators(@NonNull final Validator<Type>... validators) {
        Condition.INSTANCE.ensureNotNull(validators, "The validators may not be null");
        Condition.INSTANCE.ensureAtLeast(validators.length, 1, "The validators may not be empty");
        this.validators = validators;
    }
445761
public final void setValidator(@NonNull final Validator<Type> validator) {
        Condition.INSTANCE.ensureNotNull(validator, "The validator may not be null");
        this.validator = validator;
    }
946607
public function addValidators(array $validators)
    {
        foreach ($validators as $validator) {
            if ($validator === null) {
                continue;
            }

            $this->addValidator($validator);
        }

        return $this;
    }
823594
public CORSHandlerBuilder withAllowedMethods(Method... methods) {
        if (methods == null) {
            allowedMethods = null;
        } else {
            allowedMethods = new HashSet<>(asList(methods));
        }
        return this;
    }