Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

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 SummaryDescription
validate() Validates the JavaScript code.

Method Detail

validate()

Gets any script errors generated by the Glide System.

Input Fields

Parameters:

  • None

Output Fields

Returns: Any script error messages resulting from the validation; if none have occurred, returns null.

Example

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