Module: vertx-web-api-contract-js/parameter_type_validator

Classes

ParameterTypeValidator

Methods

(static) ParameterTypeValidator.createArrayTypeValidator(arrayMembersValidator, collectionFormat, maxItems, minItems) → {ParameterTypeValidator}

Create an array type validator
Parameters:
Name Type Description
arrayMembersValidator ParameterTypeValidator Type validator that describe array items. It can't be null
collectionFormat string String that represent a ContainerSerializationStyle. Check out ContainerSerializationStyle for more informations. The default value is "csv". It can be null
maxItems number Maximum items in array. It can be null
minItems number Minimum items in array. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createBooleanTypeValidator(defaultValue) → {ParameterTypeValidator}

Create a boolean type validator
Parameters:
Name Type Description
defaultValue Object Default value that will be set if parameter is empty or not found. To apply default value you have to set ParameterValidationRule#allowEmptyValue true. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createDoubleTypeValidator(exclusiveMaximum, maximum, exclusiveMinimum, minimum, multipleOf, defaultValue) → {ParameterTypeValidator}

Create a new type validator for double values
Parameters:
Name Type Description
exclusiveMaximum boolean If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
maximum number Maximum value. It can be null
exclusiveMinimum boolean If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
minimum number Minimum value. It can be null
multipleOf number Multiple of value. It can be null
defaultValue Object Default value that will be set if parameter is empty or not found. To apply default value you have to set ParameterValidationRule#allowEmptyValue true. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createEnumTypeValidatorWithInnerValidator(allowedValues, innerValidator) → {ParameterTypeValidator}

Create an enum type validator
Parameters:
Name Type Description
allowedValues Array.<string> allowed values. It can't be null
innerValidator ParameterTypeValidator After check if value is one of the lists, you can pass the value to an inner validator. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createFloatTypeValidator(exclusiveMaximum, maximum, exclusiveMinimum, minimum, multipleOf, defaultValue) → {ParameterTypeValidator}

Create a new type validator for float values
Parameters:
Name Type Description
exclusiveMaximum boolean If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
maximum number Maximum value. It can be null
exclusiveMinimum boolean If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
minimum number Minimum value. It can be null
multipleOf number Multiple of value. It can be null
defaultValue Object Default value that will be set if parameter is empty or not found. To apply default value you have to set ParameterValidationRule#allowEmptyValue true. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createIntegerTypeValidator(exclusiveMaximum, maximum, exclusiveMinimum, minimum, multipleOf, defaultValue) → {ParameterTypeValidator}

Create a new type validator for integer values
Parameters:
Name Type Description
exclusiveMaximum boolean If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
maximum number Maximum value. It can be null
exclusiveMinimum boolean If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
minimum number Minimum value. It can be null
multipleOf number Multiple of value. It can be null
defaultValue Object Default value that will be set if parameter is empty or not found. To apply default value you have to set ParameterValidationRule#allowEmptyValue true. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createLongTypeValidator(exclusiveMaximum, maximum, exclusiveMinimum, minimum, multipleOf, defaultValue) → {ParameterTypeValidator}

Create a new type validator for long integer values
Parameters:
Name Type Description
exclusiveMaximum boolean If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
maximum number Maximum value. It can be null
exclusiveMinimum boolean If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
minimum number Minimum value. It can be null
multipleOf number Multiple of value. It can be null
defaultValue Object Default value that will be set if parameter is empty or not found. To apply default value you have to set ParameterValidationRule#allowEmptyValue true. It can be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createStringEnumTypeValidator(allowedValues) → {ParameterTypeValidator}

Create an enum type validator
Parameters:
Name Type Description
allowedValues Array.<string> allowed values. It can't be null
Source:
Returns:
Type
ParameterTypeValidator

(static) ParameterTypeValidator.createStringTypeValidator(pattern, minLength, maxLength, defaultValue) → {ParameterTypeValidator}

Create a new string type validator
Parameters:
Name Type Description
pattern string pattern that string have to match. It can be null
minLength number Minimum length of string. It can be null
maxLength number Maximum length of string. It can be null
defaultValue Object Default value that will be set if parameter is empty or not found. To apply default value you have to set ParameterValidationRule#allowEmptyValue true. It can be null
Source:
Returns:
Type
ParameterTypeValidator