public class | source

QuestionBase

A base class for Question

Constructor Summary

Public Constructor
public

constructor(model: object)

Create instance.

Member Summary

Public Members
public get

customQuestion: CustomQuestion

Custom question settings

source
public get

customRendering: boolean

Is default Confirmit rendering disabled?

source
public get

formValues: object

Object with values representing question answer for server.

source
public get

id: string

Question id.

source
public get

instruction: string

Question instruction.

source
public get

isRtl: bool

Is right to left language

source
public get

text: string

Question text.

source
public get

title: string

Question title.

source
public get

Array of triggered questions.

source
public get

type: string

Question type.

source

Method Summary

Public Methods
public

validate(raiseValidationCompleteEvent: boolean, validationRuleFilter: function): QuestionValidationResult

Perform question validation

source

Public Constructors

public constructor(model: object) source

Create instance.

Params:

NameTypeAttributeDescription
model object

The instance of the model.

Public Members

public get customQuestion: CustomQuestion source

Custom question settings

public get customRendering: boolean source

Is default Confirmit rendering disabled?

public get formValues: object source

Object with values representing question answer for server.

public get id: string source

Question id.

public get instruction: string source

Question instruction.

public get isRtl: bool source

Is right to left language

public get text: string source

Question text.

public get title: string source

Question title.

public get triggeredQuestions: Array source

Array of triggered questions.

public get type: string source

Question type.

Public Methods

public validate(raiseValidationCompleteEvent: boolean, validationRuleFilter: function): QuestionValidationResult source

Perform question validation

Params:

NameTypeAttributeDescription
raiseValidationCompleteEvent boolean
  • optional
  • default: true

Raise validationComplete event if true.

validationRuleFilter function
  • optional
  • default: null

Custom filter function to apply specific validation rules only.

Return:

QuestionValidationResult

Result of question validation