SmartCheck Validation

Revision as of 11:01, 4 December 2015 by Alvin Thompson (talk | contribs)

Revision as of 11:01, 4 December 2015 by Alvin Thompson (talk | contribs)

Contents

Examples

Number value greater than 5 -> Fail:

if(ssParseNum(form.getStr("cf_Store Value")) > 5)
    {result.isPassed=false;
    result.addMsg('Some message here');
    }

End Date is before Start Date -> Fail:

if (datediff('@date(startdate)@','@date(enddate)@','d') < 0)
    {result.addMsg('End date must be later than Start date'));
    result.isPassed=false;
    }

To include other scripts from SmartCheck script:

//@include(AnotherSmartCheckScriptName)