-
-
Notifications
You must be signed in to change notification settings - Fork 620
Closed
Labels
Milestone
Description
How to make sure the schema of the body is exactly of this form.
{
'name': ...
'description': ...
}
I mean if the body contains other fields than these (name
, description
), then I want to signal them by raising an exception.
Ex:
{
'name': 'Bob'
'description': 'Card player'
'age' : 54
}
In this case, the validation should fail because the field age
is not part of the wanted schema.
Obviously, it's possible to create a custom task, but it would be a great asset to have this functionality in express-validator
. Some kind of matchSchema(true)
?
Duplicate of #1101 (comment) but this issue has been closed.