The value
The validation result reference
The configuration
This is our only exposed method.
The given values
The validation result.
This method iterates through all attributes and validates the value based on the configuration. Throws a hard error if the type property doesn't exist since its mandatory
The list of attributes in object [key,value] pair format.
The validation result
This method validates the one to one relation between given attributes and the existing configuration attributes. Generally they should exist both ways, unless specified by the "required" attribute. Required attribute follow the mongoose Schema like way, and is an array with the first parameter being true/false and the second one the error message
The given values
The validation result
Validate each value based on its configuration
The given value
The given attribute
The validation result
Generated using TypeDoc
After the validations we check for the custom validation functionality that we support. The user can configure a key which is called "validate". This key has as value an object with 2 keys: 1) validator which is a custom function 2) message which is the custom message to show if the check fails