How to change localhostname
MacBook Pro, OS X El Capitan (10.11.4)
I think you are correct. So use dashes
sudo scutil --set LocalHostName "V8s-macbook-pro"
I did a Google search for "valid domain name characters" and came up with
... domain names in gTLDs can be registered using the 26 letters of the basic Latin script (A to Z), and can include the numbers 0-9. They can also include a hyphen “-”, although not as the first or last character of the domain name.
Try
sudo scutil --set LocalHostName "quoted string of what you want for a host name"
How to change localhostname