z0mt3c / node-restify-validation

Validation for REST Services built with node-restify in node.js
MIT License
91 stars 49 forks source link

isBoolean only works on string booleans, not actual ones #69

Closed damons-sportsbet closed 6 years ago

damons-sportsbet commented 6 years ago

Perhaps I'm missing something here but if I have a request body with a json boolean then isBoolean fails. Line 123 of CompatibleValidator says: return str === 'true' || str === 'false';

this would work for headers and queries but surely this can't work for request bodies? I'm confused.

thanks,

Damon