Skip to main content

Events

The plug-in exposes 4 events that can be bound using Oracle APEX dynamic actions.

Event nameDescriptionTarget
Validation Startedtriggered when validation has starteddocument
Validation Endedtriggered when validation has endeddocument
Validation PassedItem events are triggered on Validation PassedAPEX item/column
Validation FailedItem events are triggered on Validation FailedAPEX item/column

Event Data

Each validation event has access to data describing the validation state.

Validation Started

The variable this.data describes the item/column that triggered the event. 

VariableDescription
this.data.pageItemhtml id attribute of an input field
this.data.ItemValueValue of the input field
this.data.recordIdrecord identifier, primary key values, or rowid

Validation Result Object

The variable this.data describes validated items/columns with validation results. The variables type, location, pageItem, message, and unsafe are used to display messages with the Javascript-API apex.message.showErrors.

VariableDescription
this.data.pageItemHTML id attribute of an input field – Item reference where an inline error should display. Required when location = inline.
this.data.itemValueValue of the input field
this.data.recordIdRecord identifier, primary key values, or ROWID
this.data.type‘valid' or 'error’
this.data.location'inline', 'page' or ['inline','page']
this.data.messagevalidation message in case of error
this.data.unsafefalse – Pass false if the message is already escaped and does not need to be escaped by showErrors.
this.data.columnNamedatabase column name of the input field
this.data.label(translated) heading or label of the input field or IG-Report column
this.data.errorClasskind of validation: required, format, length, range, uniqueness, foreign_key, rule, sqlerrm
this.data.consColNamescomma delimited list of affected column names for composite constraints
this.data.consItemNamescomma-delimited list of affected pageItem names for composite constraints

Validation Ended

An array of Validation Result Objects is returned for each involved item/column.

Validation Passed

A Validation Result Object with this.data.type = ‘valid’ is returned.

Validation Failed

A Validation Result Object with this.data.type = ‘error’ is returned.