Avatar

Level 2

Hi,

I was able to achieve this with the below in my change event:

if(xfa.event.newText.charAt(0).match(/[ `~!@#$%^&*()-_={}|:;."<>,\\\[\]]/g))    

{

  xfa.event.change = "";

}

But the above restricts numeric also from entering at first position i am assuming this is happening cuz im using chartAt() which probably checks only for string.

I need the user to enter either alphabet or numeric at my first character.

Please Help.