ansman/validate.js

How to validate outside the whitelist

Opened this issue · 0 comments

Hi,
is it possible to validate values that are NOT in the whitelist? The only workaround is to compare the objects (lodash etc.)

let whiteSource = cleanAttributes(originalSource, whitelist)
if ( !_.isEqual(whiteSource, originalSource) ) {
  error...
}

Thanx
Mike