JSValidator

Provides a helper function for validating JavaScript code, by getting any script errors generated by the Glide System. This class extends AbstractAjaxProcessor.

Where to use

Use this script include whenever you need to validate a script.

Method summary

Method summary Description
validate() Validates the JavaScript code.

Method detail

validate()
Gets any script errors generated by the Glide System.
  • Input field parameters: none
  • Output field returns: Any script error messages resulting from the validation; if none have occurred, returns null.

Example:

var jsv = new JSValidator();
gs.print(jsv.validate());