Avatar

Level 10

You do not need a validation pattern here because you are checking the input with the script.

Try like this..

Display Pattern:      num{99999-999}

Edit Pattern:           num{99999999}

No Validation Pattern.

In the Change event of the NumericField put the following code..

if (xfa.event.newText.length > :smiling_face_with_sunglasses:
     xfa.event.change="";

Thanks

Srini