}</pre>
To trigger when the value is selected, use '!=-1'. This would normally be used in combination with another field for validations.
===Select Many Checkbox field has at least 5 values selected===
<pre>if(((form.getStr("cf_Check Box Field").length() - form.getStr("cf_Check Box Field").replace(';','').length())<=4))
{result.isPassed=false;
result.addMsg('cf_@Check Box Field.id@','At least 5 items must be selected.');
}</pre>
===At least one role is selected on a contact===