Another way to do this is in the Naming Convention Rules tab itself, where there is a 'Replacer' column in which you can specify a substitute character for an invalid character. Hit F2 to edit the Replacer field and add the Underscore. You then have to deselect 'Space (32)' as a valid character. This has the added functionality that anything that isn't a valid character (e.g. question marks, colons, exclaimation marks, etc) also gets replaced by an underscore. This may be good or bad, depending on your requirements. You can also use different replacement characters for different Object Types, where as the other option applies across all Object Types chosen.
Hope this helps.