Currently folders with their names containing space are considered invalid names - [0]. Requests uploading folders with name containing space, have space char replaced with "-" - [1]
Also from [2], JCR does not seem to prevent using space in names of items.
Suggest to consider space as a valid character, as most file systems AEM users use, support space in folder names. Also the new UI of AEM supports uploading folders with names with spaces (eventually the JCR node also has spaces in it)
[0] https://github.com/adobe/aem-upload/blob/master/src/constants.js#L58
[1] https://github.com/adobe/aem-upload/blob/master/src/filesystem-upload-options.js#L27
[2] https://jackrabbit.apache.org/oak/docs/constraints.html