Hello,
Please help...
I wan't to check if somebody wrote float number in textfield (allowed only numbers and decimal digit).
If validation is not correct I'll wrote an error message.
I tried with:
if (ereg("([0-9]+)(.)([0-9]+)",$n,$match1) || ereg("([0-9]+)",$n,$match2)) {
if (($match1[0] != $n) && ($match2[0] != $n)) {
print "error message";
}
}
But it doesn't work for me because it allows to enter "ac" (only letters).
Help please.