Spected is a low level validation library for validating objects against defined validation rules. Framework specific validation libraries can be built upon spected, leveraging the spected appraoch of separating the speciific input from any validation. Furthermore it can be used to verify the validity deeply nested objects, f.e. server side validation of data or client side validation of JSON objects. Spected can also be used to validate Form inputs etc.
Install Spected via npm or yarn.
npm install --save spected
Spected takes care of running your predicate functions against provided inputs, by separating the validation from the input. For example we would like to define a number of validation rules for two inputs,
... read the whole story at github.com.