Fix Javascript math madness

Fix validation of range input values with decimal steps.