A couple of things about your pattern:
Firstly, within a character class definition most of the characters lose their special meanings, so your definition can become:
[*&;'!@#$%^~`+=()\[\]:/|{},\\]
which is a bit easier to rad and later maintain. You have to be careful with the '^' character as the first one after the '[' but otherwise it is just a character. The opposite is true for ']' where it is a literal ']' as the first character in the set (i.e. immediately after the '[' or '[^') and of course the '\' is still the scape character. (You may need further escaping of characters such as '"' if these are confusing the surrounding programming langauge but that us another story!)
Secondly, the commented out pattern will try to match all characters in the test string, whereas your character class definition will only match a single character and will succeed if that character is anywhere in the test string. Therefore, as it stands, your function will return "true" if value is "abc$d" (because there is a "$" in it and the '$' character is in the class set, but return "false" if value is "qwerty" because none of the characters appear anywhere. However it will also return "false" for a value of "abd___???<>" as none of those characters are in the set!
Therefore you should reverse the logical value returned by the function (being aware of the last point above), change the character class definition into a negated set, or use your original pattern. I can't see what is wrong your your original pattern (other than it doesn't check for the name to be 20 characters long and will allow names that are all spaces or dashes!) but it has the advantage of being a positive check of what is wanted rather than a negative check of what is not. Perhaps if you explain what was going wrong (with examples) then that may be the better approach.
Susan