Fixed validation of number fields