validate pill time input in range