Update goal.js, fix validation error

Fix validation error in Goal, currently won't accept any goal name because pattern isn't a regex but a string.