var transit = this.getField("bankNumber").valueAsString;
var transitLength = transit.length;
if (transit.length !=== 5)
{
xfa.host.messageBox("The transit number has to be 5 digits.")
}
I'm using Adobe proffesional 7.0, as I'm not allowed to update to a newer version for compatibility reasons.
This code won't even run, I'm not sure why, and it is under the validate event heading.
I am new to JavaScript so I could be making a really silly error.
-Brett
As a side note the object of this code is to alert the user that the transit number is not 5 digits. All banks here in Canada have 5 digit transit numbers.