vertx / io.vertx.rxjava.ext.web.api.validation / HTTPRequestValidationHandler

# HTTPRequestValidationHandler

`open class HTTPRequestValidationHandler : ValidationHandler, Handler<RoutingContext>`

An interface for add HTTP Request validation. This class can validate parameters inside query, path, headers an body (watch below) You can assign multiple body type at the same time(for example a JSON schema together with a XML schema). This interface support:

- application/x-www-form-urlencoded
- multipart/form-data
- application/xml
- application/json

Also you can add a form parameter for validation without care about content type of your request. For form parameters this interface support both "multipart/form-data" and "application/x-www-form-urlencoded" This interface allow extra parameters in the request, so it doesn't care if in a request there's a parameter without a specified validation rule If a parameter is flagged as an array, it will be validated also if the size of array is 1 element NOTE: This class has been automatically generated from the io.vertx.ext.web.api.validation.HTTPRequestValidationHandler non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `HTTPRequestValidationHandler(delegate: HTTPRequestValidationHandler)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<HTTPRequestValidationHandler>`

### Functions

addCustomValidatorFunction | `open fun addCustomValidatorFunction(customValidator: CustomValidator): HTTPRequestValidationHandler` Add a custom validator. For more informations about custom validator, see io.vertx.rxjava.ext.web.api.validation.CustomValidator
addExpectedContentType | `open fun addExpectedContentType(contentType: String): HTTPRequestValidationHandler` Add an expected content type of request. It's not needed to add application/json, application/xml, multipart/form-data and application/x-www-form-urlencoded
addFormParam | `open fun addFormParam(parameterName: String, type: ParameterType, required: Boolean): HTTPRequestValidationHandler` Add a single parameter inside a form with included parameter types
addFormParamWithCustomTypeValidator | `open fun addFormParamWithCustomTypeValidator(parameterName: String, validator: ParameterTypeValidator, required: Boolean, allowEmptyValue: Boolean): HTTPRequestValidationHandler` Add a form parameter with a custom type validator. For more informations about how to construct built-in or custom type validator, check out io.vertx.rxjava.ext.web.api.validation.ParameterTypeValidator
addFormParamWithPattern | `open fun addFormParamWithPattern(parameterName: String, pattern: String, required: Boolean): HTTPRequestValidationHandler` Add a single parameter inside a form with a custom pattern
addFormParamsArray | `open fun addFormParamsArray(parameterName: String, type: ParameterType, required: Boolean): HTTPRequestValidationHandler` Add a form parameters array with included parameter types
addFormParamsArrayWithPattern | `open fun addFormParamsArrayWithPattern(parameterName: String, pattern: String, required: Boolean): HTTPRequestValidationHandler` Add a form parameters array with a custom pattern
addHeaderParam | `open fun addHeaderParam(headerName: String, type: ParameterType, required: Boolean): HTTPRequestValidationHandler` Add a header parameter with included parameter types
addHeaderParamWithCustomTypeValidator | `open fun addHeaderParamWithCustomTypeValidator(headerName: String, validator: ParameterTypeValidator, required: Boolean, allowEmptyValue: Boolean): HTTPRequestValidationHandler` Add a header parameter with a custom type validator. For more informations about how to construct built-in or custom type validator, check out io.vertx.rxjava.ext.web.api.validation.ParameterTypeValidator
addHeaderParamWithPattern | `open fun addHeaderParamWithPattern(headerName: String, pattern: String, required: Boolean): HTTPRequestValidationHandler` Add a header parameter with a custom pattern
addJsonBodySchema | `open fun addJsonBodySchema(jsonSchema: String): HTTPRequestValidationHandler` Add a json schema for body with Content-Type "application/json"
addMultipartRequiredFile | `open fun addMultipartRequiredFile(filename: String, contentType: String): HTTPRequestValidationHandler` Add an expected filename inside multipart request.
addPathParam | `open fun addPathParam(parameterName: String, type: ParameterType): HTTPRequestValidationHandler` Add a path parameter with included parameter types. All path params are required
addPathParamWithCustomTypeValidator | `open fun addPathParamWithCustomTypeValidator(parameterName: String, validator: ParameterTypeValidator, allowEmptyValue: Boolean): HTTPRequestValidationHandler` Add a path parameter with a custom type validator. All path params are required. For more informations about how to construct built-in or custom type validator, check out io.vertx.rxjava.ext.web.api.validation.ParameterTypeValidator
addPathParamWithPattern | `open fun addPathParamWithPattern(parameterName: String, pattern: String): HTTPRequestValidationHandler` Add a path parameter with a custom pattern. All path params are required
addQueryParam | `open fun addQueryParam(parameterName: String, type: ParameterType, required: Boolean): HTTPRequestValidationHandler` Add a query parameter with included parameter types
addQueryParamWithCustomTypeValidator | `open fun addQueryParamWithCustomTypeValidator(parameterName: String, validator: ParameterTypeValidator, required: Boolean, allowEmptyValue: Boolean): HTTPRequestValidationHandler` Add a query parameter with a custom type validator. For more informations about how to construct built-in or custom type validator, check out io.vertx.rxjava.ext.web.api.validation.ParameterTypeValidator
addQueryParamWithPattern | `open fun addQueryParamWithPattern(parameterName: String, pattern: String, required: Boolean): HTTPRequestValidationHandler` Add a query parameter with a custom pattern
addQueryParamsArray | `open fun addQueryParamsArray(arrayName: String, type: ParameterType, required: Boolean): HTTPRequestValidationHandler` Add a query parameters array with included parameter types
addQueryParamsArrayWithPattern | `open fun addQueryParamsArrayWithPattern(arrayName: String, pattern: String, required: Boolean): HTTPRequestValidationHandler` Add a query parameters array with a custom pattern
addXMLBodySchema | `open fun addXMLBodySchema(xmlSchema: String): HTTPRequestValidationHandler` Add a xml schema for body with Content-Type "application/xml"
create | `open static fun create(): HTTPRequestValidationHandler` Factory method to create an HTTPRequestValidationHandler
equals | `open fun equals(other: Any?): Boolean`
getDelegate | `open fun getDelegate(): HTTPRequestValidationHandler`
handle | `open fun handle(arg0: RoutingContext): Unit`
hashCode | `open fun hashCode(): Int`
newInstance | `open static fun newInstance(arg: HTTPRequestValidationHandler): HTTPRequestValidationHandler`
toString | `open fun toString(): String`