Symfony2 - Validation not working for embedded Form Type

后端 未结 8 1411
北海茫月
北海茫月 2020-12-07 12:59

I have a form that combines two entities (User and Profile).

Validation seems to work on the first part of the form that comes form the User Entity and is the basis

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 13:26

    You have to add validation_groups in your ProfiletType also. Validation is done in each form type separately based on their data_class if exists.

提交回复
热议问题