This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Public Method Question Editor API

checkValidation()

Checks whether the question currently being edited has a correct answer set.

Examples

var result = questionEditorApp.checkValidation({ showErrors: true }); // { has_validation: true }

Arguments

  • options object
    • showErrors boolean
      When true and a correct answer is not set, this will highlight the "Set correct answer(s)" section in the UI.

      Default: false

Return value

  • validationStatusObject object

    A return object of checkValidation that contains has_validation property which indicates the presence of validation

    • has_validation boolean

      If true, the question currently being edited has a correct answer set.

  • false

    If the operation can not be performed.
    i.e., the widget currently being edited is not a question, or the editor is not in the widget edit view.

    Note An error message will also be logged to the console.

Was this article helpful?