Add JS validation for invalid characters in branch name Fixes #3293 Demo:  See merge request !2122