fixed validation function to accept well formated branch names