Avatar

Level 10

The rawValue is only updated when you exit a field.

You can use a script with regular expression in the exit event to test against the rawValue.

 

if (this.rawValue.match(/^(\D{7,8}|\D{10})$/) === null) {

    xfa.host.messageBox("Invalid value entered.");
}