Changes

SmartCheck Validation

490 bytes added, 16:25, 13 June 2022
SmartCheck Validation Structure
<pre>if(ssParseNum(form.getStr("cf_Store Value")) > 5)
{result.isPassed=false;
result.addMsg('Some message here');
}
</pre>
 
If custom field is a currency and the format will change based on different locales, use ssParseNumFromCurrency(value,locale,getnumtype,emptyok):
 
- "@sslocale@" returns the logged in user's locale
 
- getnumtype: 1=real number (10000,78 becomes 10000.78), 2=formatted currency (10000,78)
 
- emptyok: field can be empty
 
<pre>if(ssParseNumFromCurrency(form.getStr("cf_myCADcurrency"),"@sslocale@",1,true) > 5)
{result.isPassed=false;
result.addMsg('Some message here');
Smartstaff
124
edits