Validating fields in javascript [duplicate]

0

I'm having a little problem which is as follows:

In certain fields of a form, the user can not type letters, special characters (except . , + and - ). When the user presses the . button once it does not allow typing the point again. If he type the dot again the numbers that appear after the dot should be selected.

Is it possible to make it friends?

    
asked by anonymous 15.12.2014 / 12:58

1 answer

0

Yes, there are many components on the web for this. I use the Masked Input Plugin for jQuery, but there are many others like the jQuery Mask Plugin . Put jQuery Mask on Google you think several. If you do not use jQuery, there are also components that do not require it, but I strongly recommend that you use it.

    
15.12.2014 / 13:03