2021.03.04
unique()
no longer needs to takeval
as a parameter and will return a validate function- ParamBuilder was introduced to aid in the declaration and re-use of parameters
- ParamBuilder deprecates the standart object-based way of declaring params, to discourage the old way it also introduces extra validate functions exclusive to it's use
- A new internal API handles errors in a better manner and responds with more user friendly error messages. Said API is also user extensible & overwritable.
reqparams()
andreqquery
have been removed, usereqall
instead.- Params has now been broken down into Param & Params. Params is now simply a map of "Param"s
- The
name
property was added to Param, this property will be used by the error API to refer to said Param insead of using the Param's path, that is, if you define'user.name.first': { ... }
and give it a name offirst name
the error API will respond withInvalid first name
instead ofInvalid user.name.first
2020.11.30
- Keys of type
Date
will now accept ISO Date strings, as this is the most common way dates are send from clients to servers
2020.09.16
- Fixed a bug with
requiredIf
's behavior
2020.09.16
- Added
requiredIf
to keys - Added functionality to
nullable
for required parameters - A bunch of things were improved to make reqparams actually usable with TypeScript (i.e I now know how to make interface properties optional)
- Tests are now written in TypeScript
- Coverage reporting