title: example of beforeSave cloud code in parse.com
body: <p>I am usning the following code in Corona to post a table to parse.com (example data).</p>
  
  <pre><code>message1["x1"] = 1
  message1["x2"] = 2
  message1["y1"] = 3
  message1["y2"] = 4
  message1["v"] = 5
  params.body = json.encode ( message1 )
  network.request( baseUrl .. objectClass, "POST", sendresponse,  params)
  </code></pre>
  
  <p>and the following is my beforeSave function to prevent it being save as x1=1.</p>
  
  <pre><code>Parse.Cloud.beforeSave(Parse.User, function(request, response) {
    if object.equalTo("1", request.params.x1) {
      response.error("x value not valid");
    } else {
      response.success();
    }
  });
  </code></pre>
  
  <p>is this the right way of writing this code? Also does beforeSave run on each object post or I have to call it?
  Many thanks</p>