Can an Antiepileptic medication cause malformation or autism in a 22 weeks pregnancy?

My daughter has 22 weeks of pregnancy and she is having seizures. The Doctor said that she needs to start medications as soon as possible. She had epilepsy and she is been out of medications for about 7 years. We are worry because we heard that this can cause malformation or autism in the baby. Is that possible if she has 22 weeks already?