Hello, I'm not new to Javascript, but I am new to Acrobat, and I'm having a strange problem that I can't seem to figure out regarding form validation. My understanding is that the validation event is triggered on an onBlur event of the field, which is all good, but the weird part is that it seems to be validating the value that was held in the field before editing, not the new value. For example, if there's a 4 in the field and I change it to 5, then click outside the field to trigger the onBlur, it will run validation against the 4 and not the 5. Here's the code I'm using to test this, in case anyone is wondering.
fValue = getField("field10").value;
var sayMe = "Value is: "+fValue;
app.alert(sayMe);
So if I have a 4 in the field, then enter 5 and click a different field, it will return "Value is: 4" then if I change the now entered 5 to a 3, it'll return "Value is: 5" and so on.
fValue = event.value;
var sayMe = "Value is: "+fValue;
app.alert(sayMe);
Note that the type of event.value is always a string, which is not the case with the value property of a field.