Validation of a spinner field in form is not working as expected. In catalog 17.1.0.16, the validation function only works correctly when the field value is changed manually in the text box, and does not work when the attached arrows of the spinner field are used or the form is submitted.
The function is configured in the onValidate attribute of the field with the call ca_fd.js.validate(_val), and the function code is written in the script dialog.
{
validate:function(value){
console.log('Validate field '+value);
var ip_free = parseInt(ca_fdGetTextFieldValue(formId,'ip_free'),10);
var ip_add = parseInt(value,10);
if(ip_add > ip_free){
return 'Validation failed';
}
else{
return null;
}
}
}
Is it a bug or has the field changed its behavior?