added validation to the work modal