Show/Hide Toolbars

Flynet Studio User Interface Generation Properties

When true, the FVEntry control is generated with the ValidateOnChange property=true.

 

When the FVEntry ValidateOnChange property is true, in a generated web page, the Scripts/[namespace]Rules.js: FieldValidate(window, fieldID,value,event) javascript function will be called with the FieldID of this field whenever the data is changed by the user or is completely blank (on tab-out).  A blank value is validated in case of new data entry where a field is required.

 

Note that the [ProjectName]Rules.js file is generated with stub script for each Field that has this property true, but you will need to finish the coding by adding your validation logic to the FieldValidate function.

 

The following code fragment is from the InsureUI2 sample project's generated UISampleRules.js file:

 

Note that the FieldID PlanCode is supported but it only will display a TODO until you add validation logic that only sets a value for the errorMsg variable if an error with the entry exists.

 

switch (fieldID) {

 case "PlanCode":

         {

                 activeSticky=PlanCodeSticky=new Object();

                 errorMsg='TODO: Edit the /Scripts/UISampleRules.js file, FieldValidate

                                  function and add rules for FieldID "PlanCode"';

                 // If there are any issues with the PlanCode, set your

                 // message in the errorMsg var and you can obtain aother values

                 // on the form using the GetPeerInputValue, as-in:

                 // var svcBundle=FVTop.GetPeerInputValue(tg,'SvcBundle');

         }

         break;