Username Validation Module

Drupal 8 Version Number
8.x-1.0
Release Date
Description and Notes

This module, the username validation module, implements restriction of the contents of Drupal user names. I have been using this module to prohibit spaces and special characters in Drupal user names, restricting user names to alphanumeric characters only. This Drupal 8 version of this module works better than the Drupal 7 version. There is a module for Drupal 7 called custom username validation that works properly and better on Drupal 7, but it has not been ported to Drupal 8. 

Currently a patched version of this module is required, which implements prohibition of spaces in Drupal user names. Notably this should be distinguished people name, for which the Real Name module provides and interface for implement real word people names, in addition to login user names, in Drupal websites.