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
If you want to implement your own type validator, you need only to implement
Methods
getDefault() → {Object}
Returns default value of parameter
Returns:
- Type
- Object
hasDefault() → {boolean}
Returns true if this type validator has default value
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 |
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 |
Returns:
request parameter value
- Type
- RequestParameter