Newbie question

This was also posted in the Beginner forums…

I live in northern california and am looking at buying a new home(not even built) as an investment. Problem is that they don’t sell to investors. So as a result I would have to say it is my primary residence. In talking to the sales person she said that I would have to live in it for a year before I could rent or sell the home.
I asked what would happen if I sold\rented before then. She said that they could force me to sell the home and take any equity earned.

My question is: Is this legal and will it hold up in court if they take action? ???