Skip to main content
added 160 characters in body
Source Link
epoch
  • 16.7k
  • 5
  • 50
  • 72

You would be better off by using a library like maskedinput.js. You can then setup your text input like follows:

jQuery(function($){ $("#your_input").mask("999"); }); 

UPDATE

you can use a validator for forms and preset specific types of fields to validate

You would be better off by using a library like maskedinput.js. You can then setup your text input like follows:

jQuery(function($){ $("#your_input").mask("999"); }); 

You would be better off by using a library like maskedinput.js. You can then setup your text input like follows:

jQuery(function($){ $("#your_input").mask("999"); }); 

UPDATE

you can use a validator for forms and preset specific types of fields to validate

Source Link
epoch
  • 16.7k
  • 5
  • 50
  • 72

You would be better off by using a library like maskedinput.js. You can then setup your text input like follows:

jQuery(function($){ $("#your_input").mask("999"); });