express-json-validator-middleware icon indicating copy to clipboard operation
express-json-validator-middleware copied to clipboard

Make options object optional for Validator constructor

Open simonplend opened this issue 2 years ago • 2 comments

Currently you must always pass an object if you're using TypeScript.

simonplend avatar Jun 29 '22 07:06 simonplend

Hi, I want to contribute to this library. Can I add the default value of options to an empty object?

kisankumavat85 avatar Aug 21 '22 15:08 kisankumavat85

Hi, I want to contribute to this library. Can I add the default value of options to an empty object?

@kisankumavat85 A pull request would be great, thanks!

I would recommend waiting until #116 has been merged as that makes some changes to the Validator class constructor that you'll need to add changes on top of (I'm currently testing it).

Feel free to Subscribe to notifications on that PR so you get notified when it's merged, but I'll also try and update this issue too.

simonplend avatar Aug 30 '22 10:08 simonplend