Adds a new validator that can be used most specifically for Hook validation.
This PR also improves the information in the documentation generation for isArray, isObject and oneOf validators giving information about the types that they wrap.
This through a new syntax for the documentation generation when describing wrapped validators. [TYPE] means that the type is optional, <TYPE> means that it is required. A question mark in front of the type, ?TYPE means that it can be empty.
Array(<String>) means that null and undefined are allowed as values but not empty strings as an example.
Adds a new validator that can be used most specifically for Hook validation.
This PR also improves the information in the documentation generation for
isArray
,isObject
andoneOf
validators giving information about the types that they wrap.This through a new syntax for the documentation generation when describing wrapped validators.
[TYPE]
means that the type is optional,<TYPE>
means that it is required. A question mark in front of the type,?TYPE
means that it can be empty.Array(<String>)
means thatnull
andundefined
are allowed as values but not empty strings as an example.