var cfgAllForms=new ConfigAllForms(); function wrtBssBottom(vv,vx,vw,vz,vy){var v2="if(df(vCurrent)){vCurrent=vCurrent.split(' | ')}";var v0=" ";var clatfRqd;var vq;if(df(vz)){clatfRqd=new CLATrueFalse("sMsgRequired",undefined,undefined,vz,undefined,false)}if(df(vy)){vq=new CLATrueFalse("sMsgTxtEmail",undefined,undefined,vy,undefined,false)}var vn=new CLAChkTxtDdb("asGlobalBadSubStrs","form.asGlobalBadSubStrs",undefined,["\\\\ | \\\' | ~ | \\\\n","aaa | bbb | ccc | ddd","666 | 333 | 999","!","0 | 9","@ | . | _"],0,false,undefined,v2);var vo=new CLATrueFalse("bsNoBadSubStrs",undefined,undefined,"true",undefined,false,v0);var vm=new CLAChkTxtDdb("asBadSubStrs",undefined,undefined,["\\\\ | \\\' | ~ | \\\\n","aaa | bbb | ccc | ddd","666 | 333 | 999","!","0 | 9","@ | . | _"],1,true,v0,v2);var vp=new CLATrueFalse("sMsgBadSubStr", undefined, undefined, 'The sub-string "~BSS_FOUND~" may not equal, or be found in, your '+vw+'.\\n\\n\\nAll bad sub-strings: ~BSS_LIST~', undefined, true, v0);var acla=[vo,vm,vp];if(df(vz)){acla[acla.length]=clatfRqd}if(df(vy)){acla[acla.length]=vq}var clForm=new ConfigFrmObj("",[vn],false);var cfgLmnt=new ConfigFrmObj(vx,acla,false);var cfgFrm=new ConfigForm("my_form_"+vv,[clForm,cfgLmnt]);cfgAllForms.addConfigForm(cfgFrm);if(df(vz)){clatfRqd.wrtCLATrueFalse()}if(df(vy)){vq.wrtCLATrueFalse()}vn.wrtCLAChkTxtDdb();vo.wrtCLATrueFalse();vm.wrtCLAChkTxtDdb();vp.wrtCLATrueFalse();wrt('
Each string array element must be separated by \' |
\' (space-pipe-space). Also be careful about escaping characters. The top drop-down item is a positive example.
sMsgTxt
string elements consider illegal.In my experience, the most commonly-needed bad sub-strings are the escape slash (\'\\\') and the single quote ("\'"), to protect against database and JavaScript errors.', v1);vs.setWhenPrvdNotPrvd('sMsgBadSubStr
must be provided and bsNoBadSubStrs
may not be provided (see sMsgTxt
element exceptions).',"No element may have bsNoBadSubStrs
associated to it. Any element having either sMsgBadSubStr
or asBadSubStrs
associated to it, must also associate the other.");wrtAttributeTable("bss",vs);
var vt=new DocAttr(a2c_bsNbss,"Overrides form.asGlobalBadSubStrs
for this single element, declaring all strings legal.", sBS_NOTE);vt.setWhenPrvdNotPrvd('form.asGlobalBadSubStrs
must exist, and neither asBadSubStrs
nor sMsgBadSubStr
may be associated to the element (see sMsgTxt
element exceptions).',"sMsgBadSubStr
must be associated to the element (given the 'sMsgTxt
' exception).");wrtAttributeTable("bss",vt);
var vr=new DocAttr(a2c_asBss,"The array of strings that this element's value considers illegal. When form.asGlobalSubStrs
exists, this overrides it.", v1);vr.setWhenPrvdNotPrvd('If form.asGlobalBadSubStrs
exists, this overrides it for this element only. No matter what, sMsgBadSubStr
must also be associated, and bsNoBadSubStrs
may not be associated (see sMsgTxt
element exceptions).',"Unless form.asGlobalBadSubStrs
is provided, sMsgBadSubStr
may not exist.");wrtAttributeTable("bss",vr);
var vu=new DocAttr(a2c_sMbss,sSMSG_PPRE+" value contains or is equal to an illegal string.",sSMSG_RLS);vu.addSpecialString(sSS_BSS_FOUND,"the bad sub-string found in (or equal to) the value.");vu.addSpecialString(sSS_BSS_LIST, "the list of bad sub-strings. Specifically, either...\n
"['" + asBadSubStrs.join("', '") + "']"
\n
"['" + f_orm.asGlobalBadSubStrs.join("', '") + "']"
...depending on which is applicable for the element.");vu.setWhenPrvdNotPrvd('Either form.asGlobalBadSubStrs
or asBadSubStr
must be provided, and bsNoBadSubStrs
may not be provided (see sMsgTxt
element exceptions).',"asBadSubStrs
may not be provided.");wrtAttributeTable("bss",vu);
wrt('
\n\n\n\n\n');wrt('
TOP Exceptions: sMsgTxt* elements and Bad Sub-String attributes');wrt('[ | ');wrt('|||
When form.asGlobalBadSubStrs is provided: | ');wrt('|||
When an sMsgTxt attribute is... | ');wrt('...here are the rules for the below attributes for... | ');wrt('...text / password elements... | ');wrt('...and textarea elements | ');wrt('
...associated to the element... | ');wrt('bsNoBadSubStrs | ');wrt('Forbidden. It is assumed there are no bad sub-strings unless sMsgBadSubStrs is provided. | ');wrt('Not applicable | ');wrt('
sMsgBadSubStr | ');wrt('Optional, unless asBadSubStrs is also provided, in which case this is required. When provided, then this element does have bad sub-strings. | ');wrt('||
asBadSubStrs | ');wrt('Optional. When provided, then this element overrides form.asGlobalBadSubStrs , to define a set of bad-sub-strings for this element only. | ');wrt('||
...not associated to the element... | ');wrt('bsNoBadSubStrs | ');wrt('Either this or sMsgBadSubStr is required | ');wrt('|
sMsgBadSubStr | ');wrt('Either this or bsNoBadSubStrs is required | ');wrt('||
asBadSubStrs | ');wrt('Optional. When provided, this overrides form.asGlobalBadSubStrs for this element only. | ');wrt('||
When form.asGlobalBadSubStrs is not provided: | ');wrt('|||
When an sMsgTxt attribute is... | ');wrt('...here are the rules for the below attributes for... | ');wrt('...text / password elements... | ');wrt('...and textarea elements | ');wrt('
...associated to the element... | ');wrt('bsNoBadSubStrs | ');wrt('Forbidden | ');wrt('Not applicable | ');wrt('
sMsgBadSubStr | ');wrt('Forbidden, unless asBadSubStrs is also provided, in which case this is required. | ');wrt('||
asBadSubStrs | ');wrt('Optional | ');wrt('||
...not associated to the element... | ');wrt('bsNoBadSubStrs | ');wrt('Forbidden | ');wrt('|
sMsgBadSubStr | ');wrt('Forbidden, unless asBadSubStrs is also provided, in which case this is required. | ');wrt('||
asBadSubStrs | ');wrt('Optional | ');wrt('