Class: ParameterTypeValidator

vertx-web-api-contract-js/parameter_type_validator~ ParameterTypeValidator

new ParameterTypeValidator()

Interface for declaration of method for validate a specific parameter type.
If you want to implement your own type validator, you need only to implement
Source:

Methods

getDefault() → {Object}

Returns default value of parameter
Source:
Returns:
Type
Object

hasDefault() → {boolean}

Returns true if this type validator has default value
Source:
Returns:
Type
boolean

isValid(value) → {RequestParameter}

Function that checks if parameter is valid. It returns a RequestParameter object that will be linked inside . For more info, check .
Parameters:
Name Type Description
value string value of parameter to test
Source:
Returns:
request parameter value
Type
RequestParameter

isValidCollection(value) → {RequestParameter}

Function that checks if array of values of a specific parameter. It returns a RequestParameter object that will be linked inside . For more info, check .
Parameters:
Name Type Description
value Array.<string> list of values of parameter to test
Source:
Returns:
request parameter value
Type
RequestParameter