Jump to content

Problem loading Doctrine constraints assert annotation in FRONT


Recommended Posts

Hello,

I have a problem with the loading Doctrine Constraints Assert in FRONT and not in ADMIN.

For example, i have an entity "Paper"

use Symfony\Component\Validator\Constraints as Assert;

[...]

/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
* @Assert\NotBlank()
*/
private $name;

When i call the repository in admin service, the function return the objects without error.
But when i call the same repository function in a front service an error is generated :

Quote

[...] Symfony\Component\Validator\Constraints\NotBlank annotation was never imported [...]

I have include the class in my module file and service for test but nothing change the error occure.

Thank you for your help.

 

Edited by Inodia (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...