This method validates numbers. Decimal or not, max and min.
This method takes two arguments:
A number.
An array of options (optional).
Various option are:
decimal (mixed) - Decimal chars or false when decimal not allowed. For example ",." to allow both "." and ",".
dec_prec (int) - Number of allowed decimals.
min (float) - Minimum value.
max (float) - Maximum value.
Example 66-1. Number Validation The following example assumes that one wants to validate a number when decimals are allowed and decimal character is ".", and number of allowed decimals is 4.
And the following one assumes that one wants to validate a decimal number with decimal character "," or "." while it's less than "-7" and greater than "-9".
|