hi All,
How to restrict the use of special character (like @,#,$%,*,&)in the textfields.
thanks,
Suraj
hi All,
How to restrict the use of special character (like @,#,$%,*,&)in the textfields.
thanks,
Suraj
You can add a ItemStateListener() to your textfield, so when user enters any character - notifyStateChanged() method will be called in this method you can check if any unwanted special character is added to the end of the string (using String operations) you can remove it and set rest of the string back to the textfield.
All this will happen so fast that enduser will feel that he is not allowed to enter these characters or if you want you can event display an alert for the same.
Or Even you can display an alert to the user that the the special chars are not allowed.
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,