added name validation for projects and flash error messages