Created
March 13, 2015 20:57
-
-
Save nicosomb/c6aa3c5c5507b9bfc0cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @UniqueEntity(fields={"login"}, groups={"registration"}, message="login already taken") | |
*/ | |
class Account { | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="login", type="string", length=255, nullable=false, unique=true) | |
* @Assert\NotBlank() | |
*/ | |
private $login; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$resolver->setDefaults(array( | |
'data_class' => 'AppBundle\Entity\Account', | |
'validation_groups' => array('registration'), | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment