mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
pass collection name as error property
This commit is contained in:
parent
8f0af09e78
commit
9c2500cde4
1 changed files with 8 additions and 2 deletions
|
@ -63,7 +63,10 @@ export const validateDocument = (document, collection, context) => {
|
|||
validationErrors.push({
|
||||
id: `errors.${error.type}`,
|
||||
path: error.name,
|
||||
properties: error,
|
||||
properties: {
|
||||
collection: collection._name,
|
||||
...error,
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -144,7 +147,10 @@ export const validateModifier = (modifier, document, collection, context) => {
|
|||
validationErrors.push({
|
||||
id: `errors.${error.type}`,
|
||||
path: error.name,
|
||||
properties: error,
|
||||
properties: {
|
||||
collection: collection._name,
|
||||
...error,
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue