Avatar

Level 2

I did try the code above few days back and it did not work

It did today!

I am writing the below in the exit event too, cuz the above code holds good only when the user is typing.

if (!xfa.this.rawValue.charAt(0).match(/[a-zA-Z0-9]/g)) { 

  this.rawValue = null;

  xfa.host.setFocus(this);

}

Thanks a lot radzmar!