SmartCheck Validation
Revision as of 10:10, 4 December 2015 by Lorena Ruiz (talk | contribs)
Revision as of 10:10, 4 December 2015 by Lorena Ruiz (talk | contribs)
Examples
Number value greater than 5 -> Fail:
if(ssParseNum(form.getStr("cf_Store Value")) > 5) {result.isPassed=false; result.addMsg('Some message here'); }Multiple File Upload field has no files -> Fail:
Single File Upload field has no file -> Fail:if(ssParseNum("@level1.MUlti upload.numoffiles@") < 1)
{result.isPassed=false; result.addMsg('Please upload at least one file'); }
if("@Single File Field.filename@" == "") {result.isPassed=false; result.addMsg('Please upload a file here'); }End Date is before Start Date -> Fail:
if (datediff('@date(startdate)@','@date(enddate)@','d') < 0)To include other scripts from SmartCheck script:{result.addMsg('End date must be later than Start date')); result.isPassed=false; }
//@include(AnotherSmartCheckScriptName)