I was wondering if the flag had to be in the 18" cube. We thought that the flag holder had to be in the size limit but the flag was allowed to be outside of the 18" cube. At a competition a team told us that the flag also had to be in the size limits, where they correct or were we correct?

The team you met at competition is correct. The flag must be within the 18" size limit.

Refer to <R19> in the VEX Gateway Game Manual.

Ok thanks to both of you