Finish the refactoring of the 'max' validation.