I created a symfony bundle that worked when I created it, but when I moved it somewhere else it gave me the folowing error:
Fatal error: Class ‘Symfony\Component\Validator\Constraints\type’ not found in /home/nagel/sites/battlemamono/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php on line 63
this is a validator error and the only Validator I hve is this:
Battlemamono\DatabaseBundle\Entity\Mamono:
constraints:
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
fields: name
message: A mamono with this name already exists.
groups: [creation]
properties:
id:
- type: integer
name:
- NotBlank: ~
- MaxLength: 30
- type: string
family1:
- NotBlank: ~
- MaxLength: 30
- type: string
- Choice : { callback: getFamily }
family2:
- MaxLength: 30
- type: string
- Choice : { callback: getFamily }
element1:
- NotBlank: ~
- MaxLength: 30
- type: string
- Choice : { callback: getElements }
element2:
- MaxLength: 30
- type: string
- Choice : { callback: getElements }
disposition:
- NotBlank: ~
- MaxLength: 100
- type: string
diet:
- NotBlank: ~
- MaxLength: 100
- type: string
previousForm:
- MaxLength: 30
- type: string
nextForm:
- MaxLength: 30
- type: string
evolution:
- MaxLength: 30
- type: string
evolutionLove:
- type: bool
tags:
- type: string
- MaxLength: 100
description:
- type: string
- NotBlank: ~
I dont know why it does this.
You have it in wrong format, this is what the doc says:
from http://symfony.com/doc/current/reference/constraints/Type.html