moving validation into a helper function, adding validation to workspace modal