public class | source

Question

Extends:

QuestionBase → Question

A base class for Question

Constructor Summary

Public Constructor
public

constructor(model: object)

Create instance.

Member Summary

Public Members
public get

Get allow auto re-validation on change value.

source
public set

allowValidateOnChange(value: boolean)

Set allow auto re-validation on change value.

source
public get

Fired on answer changes.

source
public get

readOnly: boolean

Is it read-only question.

source
public get

required: boolean

Is question required.

source
public get
source
public get

Fired on question validation complete.

source
public get

Fired on question validation.

source
public get

customQuestion: CustomQuestion

Custom question settings

(Inherited from QuestionBase.)
source
public get

customRendering: boolean

Is default Confirmit rendering disabled?

(Inherited from QuestionBase.)
source
public get

formValues: object

Object with values representing question answer for server.

(Inherited from QuestionBase.)
source
public get

id: string

Question id.

(Inherited from QuestionBase.)
source
public get

instruction: string

Question instruction.

(Inherited from QuestionBase.)
source
public get

isRtl: bool

Is right to left language

(Inherited from QuestionBase.)
source
public get

text: string

Question text.

(Inherited from QuestionBase.)
source
public get

title: string

Question title.

(Inherited from QuestionBase.)
source
public get

Array of triggered questions.

(Inherited from QuestionBase.)
source
public get

type: string

Question type.

(Inherited from QuestionBase.)
source

Method Summary

Public Methods
public

Clear question values.

source
public

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

Perform question validation.

source
public

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

Perform question validation

(Inherited from QuestionBase.)
source

Public Constructors

public constructor(model: object) source

Create instance.

Override:

QuestionBase#constructor

Params:

NameTypeAttributeDescription
model object

The instance of the model.

Public Members

public get allowValidateOnChange: boolean source

Get allow auto re-validation on change value.

public set allowValidateOnChange(value: boolean) source

Set allow auto re-validation on change value.

public get changeEvent: Event source

Fired on answer changes.

public get readOnly: boolean source

Is it read-only question.

public get required: boolean source

Is question required.

public get triggeredQuestions: * source

Array of triggered questions.

Override:

QuestionBase#triggeredQuestions

public get validationCompleteEvent: Event source

Fired on question validation complete. Use to implement custom error handling.

public get validationEvent: Event source

Fired on question validation. Use to implement custom validation logic.

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 clearValues() source

Clear question values.

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

Perform question validation.

Override:

QuestionBase#validate

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

Question validation result.

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