Skip to end of metadata
Go to start of metadata

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: 

 

 

Parameters

 

NameRequiredTypeDefaultDescription
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.
  • No labels