Text field with numeric validation not working