Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Edit checks which return false result in an error message being displayed to the user. By default this is the error message configured in this field on the edit check:

...

For more complex it edit checks it may be useful to display a more specific error message. This is possible using the customError customErrorMessage function.

Using customErrorMessage from an Edit Check

...

Please watch this walkthrough to see customErrorMessage in action:

...

Here is the example shown in the walkthrough:

Code Block
var value = itemJson.item.value;

var ret = false;
if (value == 0) {
    // just display the default error message.
} else if (value == 1) {
    customErrorMessage("The value is 1, but needs to be at least 3!");
} else if (value == 2) {
    customErrorMessage("Still not quite large enough...");
} else if (value >= 3) {
    ret = true;
}
return ret;

...