vertx / io.vertx.ext.web.api.validation / ValidationHandler

ValidationHandler

interface ValidationHandler : Handler<RoutingContext>

Base interface for validation. For basic HTTP Request Validator, use HTTPRequestValidationHandler

Author
Francesco Guardiani @slinkydeveloper

Inheritors

HTTPOperationRequestValidationHandler

interface HTTPOperationRequestValidationHandler : ValidationHandler

Base interface for HTTP request validation with API specification

HTTPRequestValidationHandler

interface HTTPRequestValidationHandler : ValidationHandler

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