`valid_account` function does not work

Here is copy-pasted implementation of account name validation from hived. I've wrote several examples of valid and invalid account names and unfortunately all of them are valid on hivemind side