In this blog post, I explain how to check whether a value is an integer.
There are many ways in which you could implement this check.
Example Server-side Approach You can validate values through server-side code as well either using the Int.
The Java Script class presented here makes the form validations many times easier.
The script has a catalog of almost all the common validation types built-in.
The drop down select list boxes usually will have one item saying ‘Select One’ (and that item will be selected by default).
This is very helpful when testing for Username, password, dollar amounts, etc.
In the ECMAScript specification, they only exist conceptually: All numbers are always floating point and integers are ranges of numbers without decimal fractions (for details, consult “Integers in Java Script” in “Speaking Java Script”).
In other words, in order to validate a field, you just associate a set of validation descriptors for each input field in the form. For such cases, a function is included which clears all validations in the validator object. Note that this validation if for fields like Textbox and multi-line text box.
For ‘selections’ like drop down and radio group, use an appropriate validation like ‘dontselect’ or ‘selone_radio’.