I am developing a Symfony2 application that uses several forms. Form data is saved in MySQL db using Doctrine2. I set some restrictions for objects using symfony annotations. Now, when the user cannot enter the corresponding data into the form, he receives an error message, but when I try to manipulate the same objects using the Command object, I get no exceptions or errors at all.
From the documentation I read, Symfony and Doctrine validation works as separate mechanisms, now ... is there a way to make them work as one? What I'm trying to avoid is to write the same checks for entity objects in order to use them as authentication and backend. Thanks.
source share