Corrected validation for number in case it is not required but has a min and max validation.