Jump to content

Edit History

Inodia

Inodia

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.

 

Inodia

Inodia

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.

 

×
×
  • Create New...