I am looking to return true if the user entered 4 into the input field.
function validateAddition() {
if($("#validateAddition").val() == 4) {
return true;
} else {
return false;
}
}
<input value=""
class="validate[required,onlyNumber,length[0,1]funcCall[validateAddition]] text-input"
type="text" id="validateAddition" name="validateAddition" />
Added this into the english language js file:
"validateAddition":{
"nname":"validateAddition",
"alertText":"* Your math is off, try again."}
This should be fine, let me know what you think is wrong.