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: OverviewAnalyzes a form's values, as provided by your users, and generates user-error messages as necessary.
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.
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.'
gtUsrErrCnt(a_flStats)
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;
validate_form.js attribute (like "sMsgRequired") has been added to/changed for/deleted from one of your form's elements.initVF()
___RPLC___ vfjs_doc_footer ___RPLCZ___