validate number input