Forum Moderators: coopster
function validateFixedInput($fixedInput,$inputType,$minChar,$maxChar)
{
// allow alphanumeric
// size between minChar and maxChar inclusive if (!ereg("^[[:alnum:]]{$minChar,$maxChar}$",$fixedInput))
{
global $errMessage;
$errMessage[] = "$inputType not selected.";
}
}
If I take out the $minChar variable and substitute an integer, it works.
$minChar is defined in the calling file and passed into the function.
Also, if I replace the ereg with this, it appears to work:
if (!ereg("^[[:alnum:]]{" . $minChar . ",$maxChar}$",$fixedInput))