Summary: Analyzes a form's values, as provided by your users, and generates user-error messages as necessary.

Function Summary
gtUsrErrCnt Analyze the form, and return the number of (user or value) errors detected.
initVF This initializes validate_form.js, as if getFormErrorMsgs() were never called.


vf_gtUsrErrCnt.js: Overview

Analyzes a form's values, as provided by your users, and generates user-error messages as necessary.







TOP     vf_gtUsrErrCnt.gtUsrErrCnt()

Analyze the form, and return the number of (user or value) errors detected.

Error messages are stored in FLStats.sUsrErr. When FLStats.sUsrErr equals undefined, that elemnt's value is legal. Otherwise, FLStats.sUsrErr equals the specific error that should be presented to your user.

For example

Take this vf-configuration:

   f_orm.your_integer.sMsgRequired = 'Your integer is required.';
   f_orm.your_integer.sMsgTxtInt = 'Your integer must be between ~RANGE_MIN~ and ~RANGE_MAX~.';
      f_orm.your_integer.iIntMin = 8;
      f_orm.your_integer.iIntMax = 100;

...and say the value of your_integer is set to '6'. This is not in the defined range, so a_flStats[idx].sUsrErr is set to:

'Your integer must be between 8 and 100.'

SIGNATURE

gtUsrErrCnt(a_flStats)





TOP     vf_gtUsrErrCnt.initVF()

This initializes validate_form.js, as if getFormErrorMsgs() were never called.

This does the following:

   stAFLSvf(undefined, 'FORM NAME'); //For every form
   //utility.js
      bCrshd = false;
      sCrshCd = undefined;
      sCrshMsg = undefined;
      fCrsh = undefined;

Some reasons to call this function

Some reasons that don't warrant a call to this function

SIGNATURE

initVF()





























___RPLC___ vfjs_doc_footer ___RPLCZ___