/
Phone API Reference - Extended - app.checkRequired
Phone API Reference - Extended - app.checkRequired
Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70
app.checkRequired
Description
Takes a parameters object and a required keys array and compares the two. If any keys are missing from the array, then an error is logged and the error screen is shown (app.showErrors).
Basic Example:
var app = require('app');
app.init();
app.checkRequired(parameters); |
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
p | Yes | object |
| This is an object containing key value pairs. |
required | Yes | array |
| Array of keys that are checked against the keys of the p object. |
Error screen shown after failing checkRequired
The required parameter ['test'] was not a key in the 'p' object passed in.
, multiple selections available,
Related content
Phone API Reference - Extended - app
Phone API Reference - Extended - app
More like this
Phone API Reference - Extended - util.forceArray
Phone API Reference - Extended - util.forceArray
More like this
Phone API Reference - Extended - util.isDef
Phone API Reference - Extended - util.isDef
More like this
Phone API Reference - Extended Classes - Auth
Phone API Reference - Extended Classes - Auth
More like this
Phone API Reference - Extended - util
Phone API Reference - Extended - util
More like this
Phone API Reference - Core - require
Phone API Reference - Core - require
More like this