JavaScript

{dialog.object}validate Method

Syntax

{dialog.object}.validate([successCallbackFunction [, failureCallbackFunction [, tabId]]]);

Arguments

successCallbackFunction Function

the name of the Javascript function to call after the validation has completed if there are no validation errors.

failureCallbackFunctionFunction

the name of the Javascript function to call after the validation has completed if there are validation errors.

tabIdString

the ID of a Tab or Accordion control object. If this argument is non-null, then only the controls on the current pane of the specified tab object are validated.

Description

Submits the UX Component to the server in order to validate the fields on the UX Component.

Differs from the .submit() method in that it does not fire the 'AfterDialogValidate' server-side event if there are no validation errors. Takes 3 optional arguments:

{dialog.Object}.validate();

In this example callback functions are specified for both the 'no errors' and 'has errors' conditions.

{dialog.Object}.validate(function(){alert('no validation errors');},function(){alert('has errors');});

In this example only the fields on the current pane of the specified tab object are validated.

{dialog.Object}.validate('','','TAB_1');

See Also