You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above should return an error if req.body contains more object keys than defined in the rule
A solution could be to add a third instance parameter to new Validator(data,rule,strict)
strict would either be true or false.
This would mean whether the validator should follow the rule strictly not allowing additional keys or not.
The text was updated successfully, but these errors were encountered:
I am using the version
3.22.1
Could it be possible to have a feature where the validator can return an error if data key with that is not defined in the rule is passed
for instance
The above should return an error if
req.body
contains more object keys than defined in the ruleA solution could be to add a third instance parameter to
new Validator(data,rule,strict)
strict would either be true or false.
This would mean whether the validator should follow the rule strictly not allowing additional keys or not.
The text was updated successfully, but these errors were encountered: