if you want to allow the use of floating point numbers then you'll have to use is_numeric instead of ctype_digit.
And remember ctype works only on strings, which will be fine for your form
ctype_digit('12') is true
ctype_digit(12) is false
This is the complete opposite behaviour to is_int
is_numeric doesn't give a monkeys