I wrote a method to a user\'s address to a collection. However, i keep getting the error:
When the modifier option is true, validation object must have at le
Yeah, that error kinda sends you in the wrong direction. Regardless, you're using $addToSet
on an object. Do this:
Meteor.users.update(currentUserId, {$set: addressDetails.address}
Try the following code:
Meteor.users.update(
{$currUserId},
{$addToSet:
{'address.streetAddress': addressDetails.streetAddress,
'address.city': addressDetails.city,
'address.state': addressDetails.state,
'address.zipCode': addressDetails.zipCode
}
});