| | |
Validating to accept both number and char but needing at least 2 digits
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
id say skip regular expressions as if your strin gis actually very long, its going to be quite a big expression. Also, you will not be able to count how many of the entered digits are numbers. Unless, you specify to the user where they need to put the numbers that is at the start or at the end, or something, regular wont do such a good job. Stick with a for loop and try to just count the number of occurances of numbers to be more than two. that should be sufficient to suit your need.
Live free.... Die Hard!
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: resize an image
- Next Thread: Context problem
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxhelp animate array automatically beta box bug calendar cart checkbox child class codes column cookies createrange() css cursor date debugger decimal design dom download dropdown editor element enter error explorer file firefox focus forms frameworks getselection google gwt html htmlform ie8 iframe images index internet java javascript jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math menu microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent php player post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search select session shopping size sql text textarea toggle variables w3c web website window windowofwords windowsxp wysiwyg \n





