Option pour que le nom d'utilisateur ne soit pas nécessaire pour commencer ou finir par un caractère alphanumérique

I’ve once spoken with someone about ruby. Is this doable with a plugin? I heard him mention I can override functions, such as in this case the validator. Is this correct?