parameter icon indicating copy to clipboard operation
parameter copied to clipboard

[Feature request] Remove not permitted attributes

Open kaikash opened this issue 4 years ago • 0 comments

I would be great to have the ability to remove not permitted attributes. For example:


const params = { age: 25, foo: "bar" }
const rules = { age: { type: "int", max: 200 } }
const errors = parameter.validate(rules, params)

make params to be equal to {age: 25}, not to {age: 25, foo: "bar"}.

kaikash avatar Oct 11 '20 19:10 kaikash