# Validation failed on nested cloud code functions with requireUser: true

**URL:** <https://community.parseplatform.org/t/validation-failed-on-nested-cloud-code-functions-with-requireuser-true/2696>\
**Category:** Cloud Code\
**Tags:** cloud-code\
**Created:** [May 28, 2022, 5:47am UTC](https://community.parseplatform.org/t/validation-failed-on-nested-cloud-code-functions-with-requireuser-true/2696 "2022-05-28T05:47:21Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dblythy](https://community.parseplatform.org/user_avatar/community.parseplatform.org/dblythy/32/231_2.png) [@dblythy](https://community.parseplatform.org/u/dblythy)\
**Post date:** [May 28, 2022, 7:56am UTC](https://community.parseplatform.org/t/validation-failed-on-nested-cloud-code-functions-with-requireuser-true/2696/5 "2022-05-28T07:56:48Z")

</div>

[https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Cloud.html#.run](https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Cloud.html#.run)

`context` gets passed to all cloud triggers, and can be very helpful to provide additional information to your trigger. You can pass context in `.save`, `.find` calls, etc, and can access via `req.context`.

Here is the example in the JS docs:

> ```auto
> const TeamMember = Parse.Object.extend("TeamMember");
> const teamMember = new TeamMember();
> teamMember.set("team", "A");
> 
> const context = { notifyTeam: false };
> await teamMember.save(null, { context: context });
> 
> ```
> 
> The context is then accessible in Cloud Code:

> ```auto
> Parse.Cloud.afterSave("TeamMember", async (req) => {
> const notifyTeam = req.context.notifyTeam;
> if (notifyTeam) {
> // Notify team about new member.
> }
> });
> 
> ```

I see that you opened a [SO issue](https://stackoverflow.com/questions/62079691/how-does-request-context-in-parse-cloud-code-work) a few years ago relating to context. I’ve opened [an issue](https://github.com/parse-community/docs/issues/874) in the docs repo to improve this. If you have any other recommendations for improvements to our docs (or would like to be involved in the doc improvement process), please let us know 😊

---

_[View the full topic](https://community.parseplatform.org/t/validation-failed-on-nested-cloud-code-functions-with-requireuser-true/2696)._
