mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
use normal validate() to throw an error
This commit is contained in:
parent
bda9feab98
commit
5054dcc900
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ export const editMutation = ({ collection, documentId, set, unset, currentUser,
|
||||||
if (validate) {
|
if (validate) {
|
||||||
|
|
||||||
// validate modifiers
|
// validate modifiers
|
||||||
collection.simpleSchema().newContext().validate({$set: set, $unset: unset}, { modifier: true });
|
collection.simpleSchema().validate({$set: set, $unset: unset}, { modifier: true });
|
||||||
|
|
||||||
// check that the current user has permission to edit each field
|
// check that the current user has permission to edit each field
|
||||||
const modifiedProperties = _.keys(set).concat(_.keys(unset));
|
const modifiedProperties = _.keys(set).concat(_.keys(unset));
|
||||||
|
|
Loading…
Add table
Reference in a new issue