Skip to content

Commit 4b24433

Browse files
abehnamfardTomWFox
authored andcommitted
Remove duplicate content (#683)
1 parent e26ae87 commit 4b24433

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

_includes/cloudcode/cloud-code.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,6 @@ If the function throws, the `Review` object will not be saved, and the client wi
192192

193193
One useful tip is that even if your mobile app has many different versions, the same version of Cloud Code applies to all of them. Thus, if you launch an application that doesn't correctly check the validity of input data, you can still fix this problem by adding a validation with `beforeSave`.
194194

195-
If you want to use `beforeSave` for a predefined class in the Parse JavaScript SDK (e.g. [Parse.User]({{ site.apis.js }}classes/Parse.User.html)), you should not pass a String for the first argument. Instead, you should pass the class itself:
196-
197-
```javascript
198-
Parse.Cloud.beforeSave(Parse.User, (request) => {
199-
if (!request.object.get("email")) {
200-
throw "email is required for signup";
201-
}
202-
});
203-
```
204-
205195
## Modifying Objects on Save
206196

207197
In some cases, you don't want to throw out invalid data. You just want to tweak it a bit before saving it. `beforeSave` can handle this case, too. Any adjustment you make to request.object will be saved.

0 commit comments

Comments
 (0)