checkValidation - Methods - Question Editor API

Question Editor API Methods

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

Type validationStatusObject

Type 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?

Did you arrive here by accident? If so, learn more about Learnosity.