Can the below validation script be corrected to do the following:
Here is the validation script I have currently. Main issues: (1) When trying to use the Reset Form button or manually clearing out the field I am recieving an error saying "field length must be equal to 9"
function AutoTab(doc, event, cNext)
// Call the built-in routine to allow numbers only.
AFNumber_Keystroke(0, 0, 0, 0, "", true);
// If we've filled in the field completely, jump to the next one.
if (event.rc && AFMergeChange(event).length == event.target.charLimit)
AutoTab(this, event, "Account");
event.rc = true;
if (event.value.length != event.target.charLimit)
app.alert("Field length must be equal to " + event.target.charLimit );
event.rc = false;
In the validation script you have to allow the field's length to be 0, or
it will not be possible to clear it...