php - Constraint Validator validates Entity before Entity is ready in Symfony 2 -


My Symfony2 (2.4.2) is a form of the application, and is a unit that I have set some verification constraints on some fields.

itemprop = "text "One of the unit's variables is an array that should not be blank.

There is an area in this form that the unit has not been mapped directly. Input is a comma-delimited string; This string will be done in an array of preg_split and the frequency will be saved above the variable. This action has been initiated by FormEvents :: POST_SUBMIT .

However, when I submit the form, even if the input string is not empty, the form shows that verification fails. I did some debugging and found that verification actually happens before FormEvents :: POST_SUBMIT . I have tried other formEvents , but there is no luck.

Is there a way to trigger the event before verification?

Note: The position above is small, it would be too long to ask me a question if the reference is my real application.

Use for data transmission of this type of form not transfer form form

Data Transformer Will kick in before verification Anything that you expect internally than the type of transformer will work, the verification will then work on the internal data format.


Comments