Fiancee visa is good for 6 months only! So within that time u should get married, coz you still have to apply her the 2 yr extension visa which is the FLR(M) b4 the visa is due.

She will stay legal in UK, as long as you follow the steps after wedding!